1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
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/>.
19 #ifndef CL_ENTITY_FX_H
20 #define CL_ENTITY_FX_H
25 #include "nel/misc/types_nl.h"
26 #include "nel/misc/vector.h"
27 #include "nel/misc/vectord.h"
28 #include "nel/3d/u_particle_system_instance.h"
31 * CEntityFX class contained datas for instanciate an FX
32 * \author Alain Saffray
33 * \author Nevrax France
42 uint32 AlwaysStarted
: 1;
43 uint32 InfinityLoop
: 1;
57 * \param FxName name of Fx, must be unique
58 * \param InstanceName name of instance (shape), used for instanciate FX
59 * \param Position initial position of Fx
60 * \param Rotation initial rotation matrix of Fx
62 CEntityFx( const std::string
& FxName
, const std::string
& InstanceName
, const NLMISC::CVector
& Position
, const NLMISC::CQuat
& Rotation
);
70 inline SStatusFx
& getStatus( void ) { return _StatusFx
; }
73 inline void setStatus( const SStatusFx
& Status
) { _StatusFx
= Status
; }
75 /// alwaysStarted return true if Fx must be always started or set it
76 inline bool alwaysStarted( void ) { return _StatusFx
.AlwaysStarted
; }
77 inline void alwaysStarted( bool b
) { _StatusFx
.AlwaysStarted
= b
; }
79 /// infinityLoop return true if Fx is must be in InfinityLoop or set it
80 inline bool infinityLoop( void ) { return _StatusFx
.InfinityLoop
; }
81 inline void infinityLoop( bool b
) { _StatusFx
.InfinityLoop
= b
; }
83 /// started return true if Fx is Started or set it
84 inline bool started( void ) { return _StatusFx
.Started
; }
85 inline void started( bool b
) { _StatusFx
.Started
= b
; }
90 /// isTerminated return true if fx is finish
91 bool isTerminated( void );
94 void deleteInstance( void);
98 std::string _InstanceName
;
99 NLMISC::CVector _Position
;
100 NLMISC::CQuat _Rotation
;
103 NL3D::UParticleSystemInstance _FxInstance
;
107 typedef std::map
< std::string
, CEntityFx
*> TMapEntityFx
;
108 extern TMapEntityFx EntityFx
;
110 void newFx( const std::string
& FxName
, const std::string
& InstanceName
, const NLMISC::CVector
& Position
, const NLMISC::CQuat
& Rotation
);
111 void deleteFx( const std::string
& FxName
);
112 void startFx( const std::string
& FxName
);
113 void manageFxEntities( void );
115 #endif // CL_ENTITY_FX_H
117 /* End of entity_fx.h */