Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / client_sheets / animation_fx_sheet.h
blob0e416fe20bef8edb77da4a2f20daeffb5c061f87
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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_ANIMATION_FX_SHEET_H
20 #define CL_ANIMATION_FX_SHEET_H
23 #include "fx_stick_mode.h"
24 #include "entity_sheet.h"
26 /**
27 * \author Matthieu 'Trap' Besson
28 * \author Nevrax France
29 * \date November 2003
31 class CAnimationFXSheet : public CEntitySheet
34 public:
36 enum TRepeatMode
38 Loop = 0, // The fx is spawned at start of anim, and cut at end (emitters are shutdown). If the same anim is repeated, the fx isn't recreated.
39 Respawn, // The fx is spawned at start of anim, and is respawned if the same anim is playes again. The fx should shutdown by itself (must have a finite duration). In all case, it is removed after an arbitrary (long) timeout
40 RespawnAndCut // The fx is spawned at start of anim, and is respawned if the same anim is played again. It is shutdown at the end of the anim (its emitters are shutdown)
43 public:
45 std::string PSName;
46 CFXStickMode StickMode;
48 float UserParam[4]; // user params of the particle system
49 std::string TrajectoryAnim; // name of an anim that export position of the fx, or empty if no such anim is used
50 NLMISC::CRGBA Color;
51 bool ScaleFX; // true if the fx must be scaled to match character size
52 TRepeatMode RepeatMode;
53 float RayRefLength; // if object is to sticked in 'ray' mode, then give the reference on z axis so that scale can apply
55 public:
56 // Constructor
57 CAnimationFXSheet(const std::string &psName = "", const float *userParams = NULL);
58 /// from CEntitySheet
59 virtual void build(const NLGEORGES::UFormElm &item);
60 /// Build the fx from an external script.
61 void build(const NLGEORGES::UFormElm &item, const std::string &prefix);
62 /// Serialize a CAnimationFX.
63 void serial(NLMISC::IStream &f);
67 #endif