Added GPLv3 headers all over the place.
[fail.git] / src / collision / Ray.h
bloba8fc922b06c38ac74525dc91122c94f5c8ed4ad3
1 /*
2 Fail game engine
3 Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_COLLISION_RAY_H_
20 #define FAIL_COLLISION_RAY_H_
22 #include "core/core.h"
23 #include "collision/collision_export.h"
24 #include "PlaceableGeom.h"
26 namespace fail { namespace collision
28 class FLCOLLISION_EXPORT Ray : public PlaceableGeom
30 //friend struct RayCollision;
32 public:
33 Ray( const Pointer< scenegraph::Frame >& pFrame, float Length );
34 Ray( const Serialization_tag& );
35 virtual void postLoad();
37 const float& getLength() const { return m_Length; }
38 void setLength( const float& x )
40 m_Length = x;
41 dGeomRaySetLength( m_GeomID, m_Length );
44 private:
45 template< class C, typename T > friend struct fail::attribute_traits;
46 float m_Length;
50 #endif