|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::UPlayList Class ReferenceA playlist/channelmixer, from which you setup your mix of animations (blend, skeleton template weight...).
More...
#include <u_play_list.h>
Inheritance diagram for NL3D::UPlayList:
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 |
|
virtual void | registerTransform (UTransform *object, const char *prefix="")=0 |
| register an Animatable object (UTransform, UCamera, UInstance...) to the playlist. More...
|
virtual void | resetAllChannels ()=0 |
| Reset all channels so that no more Animatable object (Transforms etc...) are linked to this PLayList. More...
|
|
virtual void | emptyPlayList ()=0 |
| Empty the playlist. More...
|
virtual void | setAnimation (uint8 slot, uint animation)=0 |
| Set the animation of a slot. More...
|
virtual uint | getAnimation (uint8 slot) const=0 |
| Get the animation of a slot. More...
|
|
virtual void | setTimeOrigin (uint8 slot, TGlobalAnimationTime timeOrigin)=0 |
| Set animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation. More...
|
virtual TGlobalAnimationTime | getTimeOrigin (uint8 slot) const=0 |
| Get animation time origin, ie, the time in the playlist for which slot time is the startTime of the slot animation. More...
|
virtual void | setSpeedFactor (uint8 slot, float speedFactor)=0 |
| Set animation speed factor. More...
|
virtual float | getSpeedFactor (uint8 slot) const=0 |
| Get animation speed factor. More...
|
virtual void | setWrapMode (uint8 slot, TWrapMode wrapMode)=0 |
| Set the wrap mode to use in the play list. More...
|
virtual TWrapMode | getWrapMode (uint8 slot) const=0 |
| Get the wrap mode in use in the play list. More...
|
|
virtual void | setStartWeight (uint8 slot, float startWeight, TGlobalAnimationTime time)=0 |
| Set animation start weight. More...
|
virtual float | getStartWeight (uint8 slot, TGlobalAnimationTime &time) const=0 |
| Get animation start weight. More...
|
virtual void | setEndWeight (uint8 slot, float endWeight, TGlobalAnimationTime time)=0 |
| Set animation end weight. More...
|
virtual float | getEndWeight (uint8 slot, TGlobalAnimationTime &time) const=0 |
| Get animation end weight. More...
|
virtual void | setWeightSmoothness (uint8 slot, float smoothness)=0 |
| Set weight smoothness. More...
|
virtual float | getWeightSmoothness (uint8 slot) const=0 |
| Get weight smoothness. More...
|
virtual void | setWeight (uint8 slot, float weight)=0 |
| Setup a constant animation weight. More...
|
virtual TAnimationTime | getLocalTime (uint8 slot, TGlobalAnimationTime globalTime, const UAnimationSet &animSet) const=0 |
| Convert a playlist global time in local time in a slot animation including wrap evaluation. More...
|
virtual float | getLocalWeight (uint8 slot, TGlobalAnimationTime globalTime) const=0 |
| Compute weight of a slot at a given global playlist time. More...
|
|
virtual void | setSkeletonWeight (uint8 slot, uint skeletonId, bool inverted=false)=0 |
| Set the skeleton weight animation of a slot. More...
|
virtual uint | getSkeletonWeight (uint8 slot, bool &inverted) const=0 |
| Get the skeleton weight of a slot. More...
|
|
virtual void | enableChannel (uint channelId, bool enable)=0 |
| disabling a channel means it is no more modified during animation. More...
|
virtual bool | isChannelEnabled (uint channelId) const=0 |
| see enableChannel(). More...
|
Protected Methods |
| UPlayList () |
| Constructor. More...
|
virtual | ~UPlayList () |
| Constructor. More...
|
Detailed Description
A playlist/channelmixer, from which you setup your mix of animations (blend, skeleton template weight...).
Once this UPlayList is created from the UPlayListManager (with an UAnimationSet), you just need to registerTransform() your object(s) (eg: an UInstance). Then you can use all the Animation setup function to blend, mix, setup time etc...
NB: a playlist is actually played through UPlayListManager::animate(). NB: all AnimationTime are in second. -
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 53 of file u_play_list.h.
Member Enumeration Documentation
enum NL3D::UPlayList::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 70 of file u_play_list.h. |
Constructor & Destructor Documentation
NL3D::UPlayList::UPlayList |
( |
|
) |
[inline, protected] |
|
virtual NL3D::UPlayList::~UPlayList |
( |
|
) |
[inline, protected, virtual] |
|
Member Function Documentation
virtual void NL3D::UPlayList::emptyPlayList |
( |
|
) |
[pure virtual] |
|
virtual void NL3D::UPlayList::enableChannel |
( |
uint |
channelId, |
|
|
bool |
enable |
|
) |
[pure virtual] |
|
|
disabling a channel means it is no more modified during animation.
Default is enabled. NB: this channel must have been added (via registerTransform()....). -
Parameters:
-
Implemented in NL3D::CPlayListUser. |
virtual uint NL3D::UPlayList::getAnimation |
( |
uint8 |
slot |
) |
const [pure virtual] |
|
|
Get the animation of a slot.
Default value is empty. -
Parameters:
-
slot |
is the id of the slot to set. |
-
Returns:
-
the animation number in use in this slot. Return UPlayList::empty if the slot is empty.
Implemented in NL3D::CPlayListUser. |
|
Get animation end weight.
Default value is 1.f. -
Parameters:
-
slot |
is the id to get the slot. |
time |
will get the playlist time for which the start weight is set. Default is 0.f. |
-
Returns:
-
the end weight used in the slot.
Implemented in NL3D::CPlayListUser. |
|
Convert a playlist global time in local time in a slot animation including wrap evaluation.
-
Parameters:
-
slot |
is the slot in which the local time must be computed |
time |
is the global time of the playlist |
-
Returns:
-
the local time in the slot. If no animation are set in the slot, globalTime is returned.
Implemented in NL3D::CPlayListUser. |
|
Compute weight of a slot at a given global playlist time.
-
Parameters:
-
slot |
is the slot in which the weight must be computed |
time |
is the global time of the playlist |
-
Returns:
-
the weight of the slot for the given time.
Implemented in NL3D::CPlayListUser. |
virtual uint NL3D::UPlayList::getSkeletonWeight |
( |
uint8 |
slot, |
|
|
bool & |
inverted |
|
) |
const [pure virtual] |
|
|
Get the skeleton weight of a slot.
Default value is empty. -
Parameters:
-
slot |
is the id of the slot to set. |
inverted |
will receive the invert flag. |
-
Returns:
-
the skeleton weight number in use in this slot. Return UPlayList::empty if the slot is empty.
Implemented in NL3D::CPlayListUser. |
virtual float NL3D::UPlayList::getSpeedFactor |
( |
uint8 |
slot |
) |
const [pure virtual] |
|
|
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.
Implemented in NL3D::CPlayListUser. |
|
Get animation start weight.
Default value is 1.f. -
Parameters:
-
slot |
is the id to get the slot. |
time |
will get the playlist time for which the start weight is set. Default is 0.f. |
-
Returns:
-
the start weight used in the slot.
Implemented in NL3D::CPlayListUser. |
|
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.
Implemented in NL3D::CPlayListUser. |
virtual float NL3D::UPlayList::getWeightSmoothness |
( |
uint8 |
slot |
) |
const [pure virtual] |
|
|
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.
Implemented in NL3D::CPlayListUser. |
virtual TWrapMode NL3D::UPlayList::getWrapMode |
( |
uint8 |
slot |
) |
const [pure virtual] |
|
|
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.
Implemented in NL3D::CPlayListUser. |
virtual bool NL3D::UPlayList::isChannelEnabled |
( |
uint |
channelId |
) |
const [pure virtual] |
|
virtual void NL3D::UPlayList::registerTransform |
( |
UTransform * |
object, |
|
|
const char * |
prefix = "" |
|
) |
[pure virtual] |
|
virtual void NL3D::UPlayList::resetAllChannels |
( |
|
) |
[pure virtual] |
|
|
Reset all channels so that no more Animatable object (Transforms etc...) are linked to this PLayList.
Hence, the playlist has no effect on anything.
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setAnimation |
( |
uint8 |
slot, |
|
|
uint |
animation |
|
) |
[pure virtual] |
|
|
Set the animation of a slot.
Default value is empty. -
Parameters:
-
slot |
is the id of the slot to set. |
animation |
is the animation number to use in this slot. To empty the slot, use UPlayList::empty. |
Implemented in NL3D::CPlayListUser. |
|
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. |
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setSkeletonWeight |
( |
uint8 |
slot, |
|
|
uint |
skeletonId, |
|
|
bool |
inverted = false |
|
) |
[pure virtual] |
|
|
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 UPlayList::empty. |
inverted |
is false if the weights must be used as they are, true if the weights to used are 1.f - weight. |
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setSpeedFactor |
( |
uint8 |
slot, |
|
|
float |
speedFactor |
|
) |
[pure virtual] |
|
|
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. |
Implemented in NL3D::CPlayListUser. |
|
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. |
Implemented in NL3D::CPlayListUser. |
|
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. |
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setWeight |
( |
uint8 |
slot, |
|
|
float |
weight |
|
) |
[pure virtual] |
|
|
Setup a constant animation weight.
NB: this is equivalent as following code:
- setStartWeight(slot, weight, 0);
- setEndWeight(slot, weight, 0);
-
Parameters:
-
slot |
is the id of the slot to set. |
weight |
is the factor to use in this slot. |
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setWeightSmoothness |
( |
uint8 |
slot, |
|
|
float |
smoothness |
|
) |
[pure virtual] |
|
|
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. |
Implemented in NL3D::CPlayListUser. |
virtual void NL3D::UPlayList::setWrapMode |
( |
uint8 |
slot, |
|
|
TWrapMode |
wrapMode |
|
) |
[pure virtual] |
|
|
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. |
Implemented in NL3D::CPlayListUser. |
The documentation for this class was generated from the following file:
|
|