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_ID_ARRAY_H
20 #define CL_ANIMATION_FX_ID_ARRAY_H
22 #include "animation_fx.h"
24 class CIDToStringArraySheet
;
32 * Sorts animation fx by an arbitrary ID
33 * Must be initialized from a .id_to_string_array sheet, which gives the id / sheet_name pairs
34 * The sheet name must be a .animation_fx one
36 * \author Nicolas Vizerie
37 * \author Nevrax France
40 class CAnimationFXIDArray
44 CAnimationFXIDArray();
45 /** init from a .id_to_string_array sheet
46 * animation set is required to build fxs tracks.
47 * \param mustDeleteAnimSet true if ownerShip of animset must be given to that object (e.g it is deleted by that object at release())
49 void init(const CIDToStringArraySheet
&sheet
, NL3D::UAnimationSet
*animSet
, bool mustDeleteAnimSet
= false);
50 /** init from a .id_to_string_array sheet name
51 * animation set is required to build fxs tracks.
52 * \param mustDeleteAnimSet true if ownerShip of animset must be given to that object (e.g it is deleted by that object at release())
54 void init(const std::string
&sheetName
, NL3D::UAnimationSet
*animSet
, bool mustDeleteAnimSet
= false);
55 // release data from that object
57 // retrieve a fx from its id, or NULL if not known
58 const CAnimationFX
*getFX(uint32 id
) const;
64 bool operator < (const CIDToFX
&rhs
) const { return this->ID
< rhs
.ID
; }
66 std::vector
<CIDToFX
> _IDToFXArray
;
67 NL3D::UAnimationSet
*_AnimSet
;