1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include "nel/misc/types_nl.h"
21 #include "nel/misc/vector.h"
22 #include "nel/misc/vectord.h"
23 #include "nel/pacs/u_move_primitive.h"
24 #include "nel/pacs/u_global_position.h"
25 #include "nel/3d/u_instance.h"
38 class UGlobalPosition
;
49 * \author Cyril 'Hulud' Corvazier
50 * \author Nevrax France
58 CObjectDyn (double width
, double depth
, double height
, double orientation
, const NLMISC::CVectorD
& pos
,
59 const NLMISC::CVectorD
& speed
, bool obstacle
, NLPACS::UMoveContainer
&container
, NL3D::UScene
&scene
,
60 NLPACS::UMovePrimitive::TReaction reaction
, NLPACS::UMovePrimitive::TTrigger trigger
,
61 uint8 worldImage
, uint8 nbImage
, uint8 insertWorldImage
);
63 /// Cylinder constructor
64 CObjectDyn (double radius
, double height
, const NLMISC::CVectorD
& pos
, const NLMISC::CVectorD
& speed
,
65 bool obstacle
, NLPACS::UMoveContainer
&container
, NL3D::UScene
&scene
,
66 NLPACS::UMovePrimitive::TReaction reaction
, NLPACS::UMovePrimitive::TTrigger trigger
,
67 uint8 worldImage
, uint8 nbImage
, uint8 insertWorldImage
);
70 void setPos (const NLMISC::CVectorD
& pos
);
71 void setGlobalPos (NLPACS::UGlobalPosition
& gpos
, NLMISC::CVectorD
& pos
, uint8 worldimage
);
74 void setSpeed (const NLMISC::CVectorD
& speed
);
77 const NLMISC::CVectorD
& getPos () const
83 const NLMISC::CVectorD
& getSpeed () const
89 void tryMove (double deltaTime
, NLPACS::UMoveContainer
&container
, uint8 worldImage
);
90 void doMove (double deltaTime
, uint8 worldImage
);
92 /// Remove object from container
93 void remove (NLPACS::UMoveContainer
&container
, NL3D::UScene
&scene
);
100 NLMISC::CVectorD _Position
;
101 NLMISC::CVectorD _TryPosition
;
102 NLMISC::CVectorD _Speed
;
103 NLPACS::UMovePrimitive
*_MovePrimitive
;
104 NL3D::UInstance _Instance
;
108 #endif // NL_OBJECT_H
110 /* End of object.h */