# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
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 Reference

A 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

Inheritance graph
[legend]
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) = 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, CAnimationTime 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 CAnimationTime 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, CAnimationTime time) = 0
 Set animation start weight. More...

virtual float getStartWeight (uint8 slot, CAnimationTime& time) const = 0
 Get animation start weight. More...

virtual void setEndWeight (uint8 slot, float endWeight, CAnimationTime time) = 0
 Set animation end weight. More...

virtual float getEndWeight (uint8 slot, CAnimationTime& 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 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...


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(s):
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 52 of file u_play_list.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
empty  

Definition at line 62 of file u_play_list.h.

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 69 of file u_play_list.h.


Constructor & Destructor Documentation

NL3D::UPlayList::UPlayList ( ) [inline, protected]
 

Constructor.

Definition at line 57 of file u_play_list.h.

NL3D::UPlayList::~UPlayList ( ) [inline, protected, virtual]
 

Constructor.

Definition at line 59 of file u_play_list.h.


Member Function Documentation

void NL3D::UPlayList::emptyPlayList ( ) [pure virtual]
 

Empty the playlist.

Each slot is set to its default value.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

float NL3D::UPlayList::getEndWeight ( uint8 slot,
CAnimationTime & time ) const [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

float NL3D::UPlayList::getStartWeight ( uint8 slot,
CAnimationTime & time ) const [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

CAnimationTime NL3D::UPlayList::getTimeOrigin ( uint8 slot ) const [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

void NL3D::UPlayList::registerTransform ( UTransform * object ) [pure virtual]
 

register an Animatable object (UTransform, UCamera, UInstance...) to the playlist.

Before deleting this Animatable object, you SHOULD UPlayList::resetAllChannels() or delete the playlist from the playlistmanager.

Parameters:
object   is the object which will be affected by this animation playlist.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

void NL3D::UPlayList::setEndWeight ( uint8 slot,
float endWeight,
CAnimationTime time ) [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

void NL3D::UPlayList::setStartWeight ( uint8 slot,
float startWeight,
CAnimationTime time ) [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

void NL3D::UPlayList::setTimeOrigin ( uint8 slot,
CAnimationTime timeOrigin ) [pure virtual]
 

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.

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.

Reimplemented in NL3D::CPlayListUser.


The documentation for this class was generated from the following file: