# 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::CPlayListUser Class Reference

UPlayList implementation. More...

#include <play_list_user.h>

Inheritance diagram for NL3D::CPlayListUser

Inheritance graph
[legend]
Collaboration diagram for NL3D::CPlayListUser:

Collaboration graph
[legend]
List of all members.

Public Methods

 CPlayListUser (NLMISC::CSmartPtr<CAnimationSet> animationSet)
 Constructor. More...

virtual void registerTransform (UTransform *object)
 register an Animatable object (UTransform, UCamera, UInstance...) to the playlist. More...

virtual void resetAllChannels ()
 Reset all channels so that no more Animatable object (Transforms etc...) are linked to this PLayList. More...

virtual void emptyPlayList ()
 Empty the playlist. More...

virtual void setAnimation (uint8 slot, uint animation)
 Set the animation of a slot. More...

virtual uint getAnimation (uint8 slot) const
 Get the animation of a slot. More...

virtual void setTimeOrigin (uint8 slot, CAnimationTime timeOrigin)
 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
 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)
 Set animation speed factor. More...

virtual float getSpeedFactor (uint8 slot) const
 Get animation speed factor. More...

virtual void setWrapMode (uint8 slot, TWrapMode wrapMode)
 Set the wrap mode to use in the play list. More...

virtual TWrapMode getWrapMode (uint8 slot) const
 Get the wrap mode in use in the play list. More...

virtual void setStartWeight (uint8 slot, float startWeight, CAnimationTime time)
 Set animation start weight. More...

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

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

virtual float getEndWeight (uint8 slot, CAnimationTime& time) const
 Get animation end weight. More...

virtual void setWeightSmoothness (uint8 slot, float smoothness)
 Set weight smoothness. More...

virtual float getWeightSmoothness (uint8 slot) const
 Get weight smoothness. More...

virtual void setWeight (uint8 slot, float weight)
 Setup a constant animation weight. More...

virtual void setSkeletonWeight (uint8 slot, uint skeletonId, bool inverted=false)
 Set the skeleton weight animation of a slot. More...

virtual uint getSkeletonWeight (uint8 slot, bool &inverted) const
 Get the skeleton weight of a slot. More...


Private Attributes

CAnimationPlaylist _PlayList
CChannelMixer _ChannelMixer
NLMISC::CSmartPtr<CAnimationSet_AnimationSet

Friends

class  CPlayListManagerUser

Detailed Description

UPlayList implementation.

Basicly, this is a playlist, plus a ChannelMixer.

Author(s):
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 49 of file play_list_user.h.


Constructor & Destructor Documentation

NL3D::CPlayListUser::CPlayListUser ( NLMISC::CSmartPtr< CAnimationSet > animationSet ) [inline]
 

Constructor.

Definition at line 63 of file play_list_user.h.


Member Function Documentation

void NL3D::CPlayListUser::emptyPlayList ( ) [inline, virtual]
 

Empty the playlist.

Each slot is set to its default value.

Reimplemented from NL3D::UPlayList.

Definition at line 95 of file play_list_user.h.

uint NL3D::CPlayListUser::getAnimation ( uint8 slot ) const [inline, 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 from NL3D::UPlayList.

Definition at line 105 of file play_list_user.h.

float NL3D::CPlayListUser::getEndWeight ( uint8 slot,
CAnimationTime & time ) const [inline, 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 from NL3D::UPlayList.

Definition at line 164 of file play_list_user.h.

uint NL3D::CPlayListUser::getSkeletonWeight ( uint8 slot,
bool & inverted ) const [inline, 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 from NL3D::UPlayList.

Definition at line 196 of file play_list_user.h.

float NL3D::CPlayListUser::getSpeedFactor ( uint8 slot ) const [inline, 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 from NL3D::UPlayList.

Definition at line 129 of file play_list_user.h.

float NL3D::CPlayListUser::getStartWeight ( uint8 slot,
CAnimationTime & time ) const [inline, 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 from NL3D::UPlayList.

Definition at line 154 of file play_list_user.h.

CAnimationTime NL3D::CPlayListUser::getTimeOrigin ( uint8 slot ) const [inline, 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 from NL3D::UPlayList.

Definition at line 119 of file play_list_user.h.

float NL3D::CPlayListUser::getWeightSmoothness ( uint8 slot ) const [inline, 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 from NL3D::UPlayList.

Definition at line 174 of file play_list_user.h.

TWrapMode NL3D::CPlayListUser::getWrapMode ( uint8 slot ) const [inline, 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 from NL3D::UPlayList.

Definition at line 139 of file play_list_user.h.

void NL3D::CPlayListUser::registerTransform ( UTransform * object ) [inline, 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 from NL3D::UPlayList.

Definition at line 77 of file play_list_user.h.

void NL3D::CPlayListUser::resetAllChannels ( ) [inline, 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 from NL3D::UPlayList.

Definition at line 85 of file play_list_user.h.

void NL3D::CPlayListUser::setAnimation ( uint8 slot,
uint animation ) [inline, 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 from NL3D::UPlayList.

Definition at line 100 of file play_list_user.h.

void NL3D::CPlayListUser::setEndWeight ( uint8 slot,
float endWeight,
CAnimationTime time ) [inline, 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 from NL3D::UPlayList.

Definition at line 159 of file play_list_user.h.

void NL3D::CPlayListUser::setSkeletonWeight ( uint8 slot,
uint skeletonId,
bool inverted = false ) [inline, 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 from NL3D::UPlayList.

Definition at line 191 of file play_list_user.h.

void NL3D::CPlayListUser::setSpeedFactor ( uint8 slot,
float speedFactor ) [inline, 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 from NL3D::UPlayList.

Definition at line 124 of file play_list_user.h.

void NL3D::CPlayListUser::setStartWeight ( uint8 slot,
float startWeight,
CAnimationTime time ) [inline, 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 from NL3D::UPlayList.

Definition at line 149 of file play_list_user.h.

void NL3D::CPlayListUser::setTimeOrigin ( uint8 slot,
CAnimationTime timeOrigin ) [inline, 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 from NL3D::UPlayList.

Definition at line 114 of file play_list_user.h.

void NL3D::CPlayListUser::setWeight ( uint8 slot,
float weight ) [inline, 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 from NL3D::UPlayList.

Definition at line 179 of file play_list_user.h.

void NL3D::CPlayListUser::setWeightSmoothness ( uint8 slot,
float smoothness ) [inline, 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 from NL3D::UPlayList.

Definition at line 169 of file play_list_user.h.

void NL3D::CPlayListUser::setWrapMode ( uint8 slot,
TWrapMode wrapMode ) [inline, 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 from NL3D::UPlayList.

Definition at line 134 of file play_list_user.h.


Friends And Related Function Documentation

class CPlayListManagerUser [friend]
 

Definition at line 57 of file play_list_user.h.


Member Data Documentation

NLMISC::CSmartPtr< CAnimationSet > NL3D::CPlayListUser::_AnimationSet [private]
 

Definition at line 55 of file play_list_user.h.

CChannelMixer NL3D::CPlayListUser::_ChannelMixer [private]
 

Definition at line 53 of file play_list_user.h.

CAnimationPlaylist NL3D::CPlayListUser::_PlayList [private]
 

Definition at line 52 of file play_list_user.h.


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