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

This class describes animations for several tracks. More...

#include <animation.h>

Inheritance diagram for NL3D::CAnimation:

NL3D::UAnimation List of all members.

Public Types

enum  { NotFound = 0xffffffff }

Public Methods

 CAnimation ()
 ctor. More...

virtual ~CAnimation ()
 Destructor. More...

uint getIdTrackByName (const std::string &name) const
 Get track with its name. More...

void getTrackNames (std::set< std::string > &setString) const
 Fill the set of string with the name of the channels. More...

const ITrackgetTrack (uint trackId) const
 Get a const track pointer. More...

ITrackgetTrack (uint trackId)
 Get a track pointer. More...

void addTrack (const std::string &name, ITrack *pChannel)
 Add a track at the end of the track list. More...

void serial (NLMISC::IStream &f)
 Serial the template. More...

void setMinEndTime (TAnimationTime minEndTime)
 Set animation min end time. More...

From UAnimation
virtual UTrackgetTrackByName (const char *name)
 Get an animation track with its name. More...

virtual void releaseTrack (UTrack *track)
 Relase a track interface. More...

virtual TAnimationTime getBeginTime () const
 Get begin time of the animation. More...

virtual TAnimationTime getEndTime () const
 Get end time of the animation. More...

virtual bool allTrackLoop () const
 Say if all track of this animation loop. More...


Private Types

typedef std::map< std::string,
uint32
TMapStringUInt
typedef std::vector< ITrack * > TVectAPtrTrack

Private Attributes

std::string _Name
TMapStringUInt _IdByName
TVectAPtrTrack _TrackVector
TAnimationTime _MinEndTime
Anim time caching
TAnimationTime _BeginTime
TAnimationTime _EndTime
bool _AnimLoop
bool _BeginTimeTouched
bool _EndTimeTouched
bool _AnimLoopTouched

Detailed Description

This class describes animations for several tracks.

Each track works with a IChannel for the IAnimatable objects.

Author:
Cyril 'Hulud' Corvazier , Nevrax France
Date:
2001

Definition at line 60 of file animation.h.


Member Typedef Documentation

typedef std::map<std::string, uint32> NL3D::CAnimation::TMapStringUInt [private]
 

Definition at line 149 of file animation.h.

typedef std::vector<ITrack* > NL3D::CAnimation::TVectAPtrTrack [private]
 

Definition at line 150 of file animation.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
NotFound 

Definition at line 70 of file animation.h.


Constructor & Destructor Documentation

NL3D::CAnimation::CAnimation  
 

ctor.

Definition at line 45 of file animation.cpp.

References _MinEndTime, and NL3D_MEM_ANIMATION.

NL3D::CAnimation::~CAnimation   [virtual]
 

Destructor.

Definition at line 53 of file animation.cpp.

References _TrackVector, and NL3D_MEM_ANIMATION.


Member Function Documentation

void NL3D::CAnimation::addTrack const std::string &    name,
ITrack   pChannel
 

Add a track at the end of the track list.

This method is used to insert tracks in the animation. Tracks must be allocated with new. The pointer is then handeled by the CAnimation.

Definition at line 64 of file animation.cpp.

References _AnimLoopTouched, _BeginTimeTouched, _EndTimeTouched, _IdByName, _TrackVector, and NL3D_MEM_ANIMATION.

bool NL3D::CAnimation::allTrackLoop   const [virtual]
 

Say if all track of this animation loop.

NB: If no tracks in the animation, return true

Implements NL3D::UAnimation.

Definition at line 192 of file animation.cpp.

References _AnimLoop, _AnimLoopTouched, _TrackVector, NL3D_HAUTO_UI_ANIMATION, NL3D_MEM_ANIMATION, and t.

TAnimationTime NL3D::CAnimation::getBeginTime   const [virtual]
 

Get begin time of the animation.

Returns:
the begin time.

Implements NL3D::UAnimation.

Definition at line 125 of file animation.cpp.

References _BeginTime, _BeginTimeTouched, _TrackVector, NL3D_HAUTO_UI_ANIMATION, NL3D_MEM_ANIMATION, t, and NL3D::TAnimationTime.

TAnimationTime NL3D::CAnimation::getEndTime   const [virtual]
 

Get end time of the animation.

Returns:
the end time.

Implements NL3D::UAnimation.

Definition at line 157 of file animation.cpp.

References _EndTime, _EndTimeTouched, _MinEndTime, _TrackVector, NL3D_HAUTO_UI_ANIMATION, NL3D_MEM_ANIMATION, t, and NL3D::TAnimationTime.

uint NL3D::CAnimation::getIdTrackByName const std::string &    name const [inline]
 

Get track with its name.

Parameters:
name  is the name of the desired track.
Returns:
CAnimation::NotFound if the track doesn't exist else the the id of the track.

Definition at line 77 of file animation.h.

References _IdByName, NL3D_MEM_ANIMATION, and NotFound.

Referenced by getTrackByName.

ITrack* NL3D::CAnimation::getTrack uint    trackId [inline]
 

Get a track pointer.

Parameters:
channelId  is the id of the desired channel.

Definition at line 114 of file animation.h.

References _TrackVector, and NL3D_MEM_ANIMATION.

const ITrack* NL3D::CAnimation::getTrack uint    trackId const [inline]
 

Get a const track pointer.

Parameters:
channelId  is the id of the desired channel.

Definition at line 103 of file animation.h.

References _TrackVector, and NL3D_MEM_ANIMATION.

Referenced by getTrackByName.

UTrack * NL3D::CAnimation::getTrackByName const char *    name [virtual]
 

Get an animation track with its name.

The track interface should be released with releaseTrack.

Parameters:
name  is the name of the track to get.
Returns:
NULL if the track is not found, else a pointer on the track interface.

Implements NL3D::UAnimation.

Definition at line 222 of file animation.cpp.

References getIdTrackByName, getTrack, id, NL3D_HAUTO_UI_ANIMATION, and NL3D_MEM_ANIMATION.

void NL3D::CAnimation::getTrackNames std::set< std::string > &    setString const
 

Fill the set of string with the name of the channels.

Returns:
the count of track in this animation

Definition at line 108 of file animation.cpp.

References _IdByName, and NL3D_MEM_ANIMATION.

void NL3D::CAnimation::releaseTrack UTrack   track [virtual]
 

Relase a track interface.

Parameters:
track  is a pointer on the track interface to release.

Implements NL3D::UAnimation.

Definition at line 241 of file animation.cpp.

References NL3D_HAUTO_UI_ANIMATION, and NL3D_MEM_ANIMATION.

void NL3D::CAnimation::serial NLMISC::IStream   f
 

Serial the template.

Definition at line 80 of file animation.cpp.

References _IdByName, _MinEndTime, _Name, _TrackVector, NL3D_MEM_ANIMATION, NLMISC::IStream::serial, NLMISC::IStream::serialCheck, NLMISC::IStream::serialCont, NLMISC::IStream::serialContPolyPtr, and NLMISC::IStream::serialVersion.

void NL3D::CAnimation::setMinEndTime TAnimationTime    minEndTime
 

Set animation min end time.

Definition at line 251 of file animation.cpp.

References _MinEndTime, NL3D_MEM_ANIMATION, and NL3D::TAnimationTime.


Member Data Documentation

bool NL3D::CAnimation::_AnimLoop [private]
 

Definition at line 168 of file animation.h.

Referenced by allTrackLoop.

bool NL3D::CAnimation::_AnimLoopTouched [private]
 

Definition at line 171 of file animation.h.

Referenced by addTrack, and allTrackLoop.

TAnimationTime NL3D::CAnimation::_BeginTime [private]
 

Definition at line 166 of file animation.h.

Referenced by getBeginTime.

bool NL3D::CAnimation::_BeginTimeTouched [private]
 

Definition at line 169 of file animation.h.

Referenced by addTrack, and getBeginTime.

TAnimationTime NL3D::CAnimation::_EndTime [private]
 

Definition at line 167 of file animation.h.

Referenced by getEndTime.

bool NL3D::CAnimation::_EndTimeTouched [private]
 

Definition at line 170 of file animation.h.

Referenced by addTrack, and getEndTime.

TMapStringUInt NL3D::CAnimation::_IdByName [private]
 

Definition at line 156 of file animation.h.

Referenced by addTrack, getIdTrackByName, getTrackNames, and serial.

TAnimationTime NL3D::CAnimation::_MinEndTime [private]
 

Definition at line 162 of file animation.h.

Referenced by CAnimation, getEndTime, serial, and setMinEndTime.

std::string NL3D::CAnimation::_Name [private]
 

Definition at line 153 of file animation.h.

Referenced by serial.

TVectAPtrTrack NL3D::CAnimation::_TrackVector [private]
 

Definition at line 159 of file animation.h.

Referenced by addTrack, allTrackLoop, getBeginTime, getEndTime, getTrack, serial, and ~CAnimation.


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