|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CAnimationPlaylist Class ReferenceThis class.
More...
#include <animation_playlist.h>
Inheritance diagram for NL3D::CAnimationPlaylist:
List of all members.
Public Types |
enum | { empty = 0xffffffff
} |
enum | TWrapMode { Clamp = 0,
Repeat,
Disable,
WrapModeCount
} |
| Wrap mode for the play list. More...
|
Public Methods |
| CAnimationPlaylist () |
| Constructor. More...
|
void | emptyPlayList () |
| Empty the playlist. More...
|
void | setAnimation (uint8 slot, uint animation) |
| Set the animation of a slot. More...
|
uint | getAnimation (uint8 slot) const |
| Get the animation of a slot. More...
|
void | setSkeletonWeight (uint8 slot, uint skeletonId, bool inverted=false) |
| Set the skeleton weight animation of a slot. More...
|
uint | getSkeletonWeight (uint8 slot, bool &inverted) const |
| Get the skeleton weight of a slot. More...
|
void | setTimeOrigin (uint8 slot, TGlobalAnimationTime timeOrigin) |
| Set animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation. More...
|
TGlobalAnimationTime | getTimeOrigin (uint8 slot) const |
| Get animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation. More...
|
void | setSpeedFactor (uint8 slot, float speedFactor) |
| Set animation speed factor. More...
|
float | getSpeedFactor (uint8 slot) const |
| Get animation speed factor. More...
|
void | setStartWeight (uint8 slot, float startWeight, TGlobalAnimationTime time) |
| Set animation start weight. More...
|
float | getStartWeight (uint8 slot, TGlobalAnimationTime &time) const |
| Get animation start weight. More...
|
void | setEndWeight (uint8 slot, float endWeight, TGlobalAnimationTime time) |
| Set animation end weight. More...
|
float | getEndWeight (uint8 slot, TGlobalAnimationTime &time) const |
| Get animation end weight. More...
|
void | setWeightSmoothness (uint8 slot, float smoothness) |
| Set weight smoothness. More...
|
float | getWeightSmoothness (uint8 slot) const |
| Get weight smoothness. More...
|
void | setupMixer (CChannelMixer &mixer, TGlobalAnimationTime time) const |
| Setup a channel mixer. More...
|
void | setWrapMode (uint8 slot, TWrapMode wrapMode) |
| Set the wrap mode to use in the play list. More...
|
TWrapMode | getWrapMode (uint8 slot) const |
| Get the wrap mode in use in the play list. More...
|
TAnimationTime | getLocalTime (uint8 slot, TGlobalAnimationTime globalTime, const CAnimationSet &animSet) const |
| Convert a playlist global time in local time in a slot animation including wrap evaluation. More...
|
float | getLocalWeight (uint8 slot, TGlobalAnimationTime globalTime) const |
| Compute weight of a slot at a given global playlist time. More...
|
void | serial (NLMISC::IStream &f) |
| Serial. More...
|
Static Public Methods |
float | getWeightValue (TGlobalAnimationTime startWeightTime, TGlobalAnimationTime endWeightTime, TGlobalAnimationTime time, float startWeight, float endWeight, float smoothness) |
| Static interpolation method of blend value. More...
|
Private Attributes |
uint32 | _Animations [CChannelMixer::NumAnimationSlot] |
uint32 | _SkeletonWeight [CChannelMixer::NumAnimationSlot] |
bool | _InvertWeight [CChannelMixer::NumAnimationSlot] |
TGlobalAnimationTime | _TimeOrigin [CChannelMixer::NumAnimationSlot] |
float | _SpeedFactor [CChannelMixer::NumAnimationSlot] |
float | _StartWeight [CChannelMixer::NumAnimationSlot] |
TGlobalAnimationTime | _StartWeightTime [CChannelMixer::NumAnimationSlot] |
float | _EndWeight [CChannelMixer::NumAnimationSlot] |
TGlobalAnimationTime | _EndWeightTime [CChannelMixer::NumAnimationSlot] |
float | _Smoothness [CChannelMixer::NumAnimationSlot] |
TWrapMode | _WrapMode [CChannelMixer::NumAnimationSlot] |
Detailed Description
This class.
-
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2001
Definition at line 43 of file animation_playlist.h.
Member Enumeration Documentation
enum NL3D::CAnimationPlaylist::TWrapMode
|
|
|
Wrap mode for the play list.
-
Enumeration values:
-
Clamp |
Clamp the animation time. (default). |
Repeat |
Repeat the animation. |
Disable |
Disable the animation. |
WrapModeCount |
|
Definition at line 53 of file animation_playlist.h. |
Constructor & Destructor Documentation
NL3D::CAnimationPlaylist::CAnimationPlaylist |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CAnimationPlaylist::emptyPlayList |
( |
|
) |
|
|
uint NL3D::CAnimationPlaylist::getAnimation |
( |
uint8 |
slot |
) |
const |
|
uint NL3D::CAnimationPlaylist::getSkeletonWeight |
( |
uint8 |
slot, |
|
|
bool & |
inverted |
|
) |
const |
|
float NL3D::CAnimationPlaylist::getSpeedFactor |
( |
uint8 |
slot |
) |
const |
|
|
Get animation speed factor.
Default value is 1.f. -
Parameters:
-
slot |
is the id to get the slot. |
-
Returns:
-
the speed factor used in the slot.
Definition at line 120 of file animation_playlist.cpp.
References _SpeedFactor. |
|
Get animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation.
Default value is 0.f. -
Parameters:
-
slot |
is the id to get the slot. |
-
Returns:
-
time origin used in the slot.
Definition at line 106 of file animation_playlist.cpp.
References _TimeOrigin, and NL3D::TGlobalAnimationTime. |
float NL3D::CAnimationPlaylist::getWeightSmoothness |
( |
uint8 |
slot |
) |
const |
|
|
Get weight smoothness.
This is the smoothness of the weight interpolation. Must be between 0.f and 1.f. 0.f is a sharp interpolation (linear), 1.f is a smooth interpolation (quadratic). Default value is 0.f. -
Parameters:
-
slot |
is the id of the slot to set. |
-
Returns:
-
the smoothness value.
Definition at line 166 of file animation_playlist.cpp.
References _Smoothness. |
|
Static interpolation method of blend value.
-
Parameters:
-
startBlendTime |
is the time when the blend starts. |
endBlendTime |
is the time when the blend ends. |
time |
is the current time. |
startBlend |
is the blend value at start. |
endBlend |
is the blend value at end. |
smoothness |
is the smoothnes value. (Must be between 0 and 1) |
Definition at line 243 of file animation_playlist.cpp.
References NL3D::TGlobalAnimationTime, and x.
Referenced by getLocalWeight, and setupMixer. |
|
Get the wrap mode in use in the play list.
Wrap mode tells the play list how to use an animation when current time is not in the animation. -
Returns:
-
the wrap mode in use.
Definition at line 282 of file animation_playlist.cpp.
References _WrapMode. |
|
Serial.
Definition at line 289 of file animation_playlist.cpp.
References _Animations, _EndWeight, _EndWeightTime, _InvertWeight, _SkeletonWeight, _Smoothness, _SpeedFactor, _StartWeight, _StartWeightTime, _TimeOrigin, _WrapMode, NLMISC::IStream::serial, NLMISC::IStream::serialEnum, and NLMISC::IStream::serialVersion. |
void NL3D::CAnimationPlaylist::setAnimation |
( |
uint8 |
slot, |
|
|
uint |
animation |
|
) |
|
|
|
Set animation end weight.
This is the weight for this animation use at the end of the animation slot. Default value is 1.f. -
Parameters:
-
slot |
is the id of the slot to set. |
time |
is the playlist time for which the start weight is set. Default is 1.f. |
endWeight |
is the factor to use in this slot. |
Definition at line 143 of file animation_playlist.cpp.
References _EndWeight, _EndWeightTime, and NL3D::TGlobalAnimationTime. |
void NL3D::CAnimationPlaylist::setSkeletonWeight |
( |
uint8 |
slot, |
|
|
uint |
skeletonId, |
|
|
bool |
inverted = false |
|
) |
|
|
|
Set the skeleton weight animation of a slot.
Default value is empty. -
Parameters:
-
slot |
is the id of the slot to set. |
skeletonId |
is the skeleton weight number to use in this slot. To empty the slot, use CAnimationPlaylist::empty. |
inverted |
is false if the weights must be used as they are, true if the weights to used are 1.f - weight. |
Definition at line 83 of file animation_playlist.cpp.
References _InvertWeight, and _SkeletonWeight. |
void NL3D::CAnimationPlaylist::setSpeedFactor |
( |
uint8 |
slot, |
|
|
float |
speedFactor |
|
) |
|
|
|
Set animation speed factor.
Default value is 1.f. -
Parameters:
-
slot |
is the id of the slot to set. |
speedFactor |
is the factor to use in this slot. The animation will go speedFactor* faster. |
Definition at line 113 of file animation_playlist.cpp.
References _SpeedFactor. |
|
Set animation start weight.
This is the weight for this animation use at the beginning of the animation slot. Default value is 1.f. -
Parameters:
-
slot |
is the id of the slot to set. |
startWeight |
is the factor to use in this slot. |
time |
is the playlist time for which the start weight is set. Default is 0.f. |
Definition at line 127 of file animation_playlist.cpp.
References _StartWeight, _StartWeightTime, and NL3D::TGlobalAnimationTime. |
|
Set animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation.
Default value is 0.f. -
Parameters:
-
slot |
is the id of the slot to set. |
timeOrigin |
time origin to use in the slot. |
Definition at line 99 of file animation_playlist.cpp.
References _TimeOrigin, and NL3D::TGlobalAnimationTime. |
|
Setup a channel mixer.
For each slot, it sets : * the animation id used by the slot. * the animation time according with the begin time of each slot, the speed factor of each slot and the current time passed in parameter. * the skeleton weight id. * the weight interpolated with the start and end values. The weight value are clamped before and after the animation.
Definition at line 173 of file animation_playlist.cpp.
References _Animations, _EndWeight, _EndWeightTime, _InvertWeight, _SkeletonWeight, _Smoothness, _StartWeight, _StartWeightTime, _WrapMode, Disable, empty, getLocalTime, getWeightValue, s, NL3D::TAnimationTime, and NL3D::TGlobalAnimationTime. |
void NL3D::CAnimationPlaylist::setWeightSmoothness |
( |
uint8 |
slot, |
|
|
float |
smoothness |
|
) |
|
|
|
Set weight smoothness.
This is the smoothness of the weight interpolation. Must be between 0.f and 1.f. 0.f is a sharp interpolation (linear), 1.f is a smooth interpolation (quadratic). Default value is 0.f. -
Parameters:
-
slot |
is the id of the slot to set. |
smoothness |
is the smoothness value. |
Definition at line 159 of file animation_playlist.cpp.
References _Smoothness. |
void NL3D::CAnimationPlaylist::setWrapMode |
( |
uint8 |
slot, |
|
|
TWrapMode |
wrapMode |
|
) |
|
|
|
Set the wrap mode to use in the play list.
Wrap mode tells the play list how to use an animation when current time is not in the animation. -
Parameters:
-
wrapMode |
is the mode to use. |
Definition at line 275 of file animation_playlist.cpp.
References _WrapMode. |
Member Data Documentation
uint32 NL3D::CAnimationPlaylist::_Animations[CChannelMixer::NumAnimationSlot] [private]
|
|
float NL3D::CAnimationPlaylist::_EndWeight[CChannelMixer::NumAnimationSlot] [private]
|
|
TGlobalAnimationTime NL3D::CAnimationPlaylist::_EndWeightTime[CChannelMixer::NumAnimationSlot] [private]
|
|
bool NL3D::CAnimationPlaylist::_InvertWeight[CChannelMixer::NumAnimationSlot] [private]
|
|
uint32 NL3D::CAnimationPlaylist::_SkeletonWeight[CChannelMixer::NumAnimationSlot] [private]
|
|
float NL3D::CAnimationPlaylist::_Smoothness[CChannelMixer::NumAnimationSlot] [private]
|
|
float NL3D::CAnimationPlaylist::_SpeedFactor[CChannelMixer::NumAnimationSlot] [private]
|
|
float NL3D::CAnimationPlaylist::_StartWeight[CChannelMixer::NumAnimationSlot] [private]
|
|
TGlobalAnimationTime NL3D::CAnimationPlaylist::_StartWeightTime[CChannelMixer::NumAnimationSlot] [private]
|
|
TGlobalAnimationTime NL3D::CAnimationPlaylist::_TimeOrigin[CChannelMixer::NumAnimationSlot] [private]
|
|
TWrapMode NL3D::CAnimationPlaylist::_WrapMode[CChannelMixer::NumAnimationSlot] [private]
|
|
The documentation for this class was generated from the following files:
|
|