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_ANIMATION_FX_SHEET_H
20 #define CL_ANIMATION_FX_SHEET_H
22 #include "client_sheets/animation_set_list_sheet.h" // contains CAnimationFXSheet
28 class UParticleSystemInstance
;
36 /** Sheet of a fx that must be played with an animation.
37 * Such an fx has the following properties :
38 * - it can have a color
39 * - it can be sticked to a bone when used with a skeleton
40 * - it can follow a position spline for more sophisticated effects.
42 * \author Nicolas Vizerie
43 * \author Nevrax France
51 NL3D::UTrack
*PosTrack
; // Filled after init : additionnal pos track to animate the fx
52 CAnimationFXSheet
*Sheet
;
57 CAnimationFX(const std::string
&psName
= "", const float *userParams
= NULL
);
59 void init(CAnimationFXSheet
*sheet
, NL3D::UAnimationSet
*as
);
61 // build track for that fx, using the given animation set
62 void buildTrack(NL3D::UAnimationSet
*as
);
64 // helper : create instance matching that sheet. NB : the instance is not sticked neither positionned.
65 NL3D::UParticleSystemInstance
createMatchingInstance() const;
69 // a set of anim fx serialized from a .animation_fx_set sheet
73 enum { MaxNumFX
= 4 };
74 std::vector
<CAnimationFX
> FX
;
76 // build track for that fx, using the given animation set
77 void buildTrack(NL3D::UAnimationSet
*as
);