The track store an animation of an animated value. More...
#include <track.h>
Inherits NL3D::UTrack.
Inherited by NL3D::ITrackKeyFramer< CKeyBezierFloat >, NL3D::ITrackKeyFramer< CKeyBezierQuat >, NL3D::ITrackKeyFramer< CKeyBezierVector >, NL3D::ITrackKeyFramer< CKeyBool >, NL3D::ITrackKeyFramer< CKeyFloat >, NL3D::ITrackKeyFramer< CKeyInt >, NL3D::ITrackKeyFramer< CKeyQuat >, NL3D::ITrackKeyFramer< CKeyRGBA >, NL3D::ITrackKeyFramer< CKeyString >, NL3D::ITrackKeyFramer< CKeyTCBFloat >, NL3D::ITrackKeyFramer< CKeyTCBQuat >, NL3D::ITrackKeyFramer< CKeyTCBVector >, NL3D::ITrackKeyFramer< CKeyVector >, NL3D::CTrackSampledCommon, NL3D::CTrackSampledQuatSmallHeader, NL3D::ITrackDefault, and NL3D::ITrackKeyFramer< CKeyT >.
Public Member Functions | |
| virtual | ~ITrack () |
| Virtual destructor. | |
| virtual const IAnimatedValue & | eval (const TAnimationTime &date, CAnimatedValueBlock &avBlock)=0 |
| Evaluation of the value of the track for this time. | |
| virtual bool | getLoopMode () const =0 |
| get LoopMode. | |
| virtual void | applySampleDivisor (uint) |
| typically used by CAnimation to lower the number of keys. | |
| virtual bool | applyTrackQuatHeaderCompressionPass0 (CTrackSampleCounter &) |
| used by CAnimation to compress the header of CTrackSampledQuat supported only by CTrackSampledQuat | |
| virtual ITrack * | applyTrackQuatHeaderCompressionPass1 (uint &, CTrackSamplePack &) |
From UTrack | |
| virtual bool | interpolate (TAnimationTime time, float &res) |
| Interplation a float value. | |
| virtual bool | interpolate (TAnimationTime time, sint32 &res) |
| Interplation an integer value. | |
| virtual bool | interpolate (TAnimationTime time, NLMISC::CRGBA &res) |
| Interplation a CRGBA value. | |
| virtual bool | interpolate (TAnimationTime time, NLMISC::CVector &res) |
| Interplation a CVector value. | |
| virtual bool | interpolate (TAnimationTime time, NLMISC::CQuat &res) |
| Interplation a CQuat value. | |
| virtual bool | interpolate (TAnimationTime time, std::string &res) |
| Interplation a string value. | |
| virtual bool | interpolate (TAnimationTime time, bool &res) |
| Interplation a bool value. | |
The track store an animation of an animated value.
This animation can be interpolated by several ways.
The ITrack and animated value types MUST match else assertions will be raised.
Definition at line 59 of file track.h.
| virtual NL3D::ITrack::~ITrack | ( | ) | [inline, virtual] |
| virtual void NL3D::ITrack::applySampleDivisor | ( | uint | ) | [inline, virtual] |
typically used by CAnimation to lower the number of keys.
not supported by default
Reimplemented in NL3D::CTrackSampledQuat, and NL3D::CTrackSampledVector.
Definition at line 83 of file track.h.
Referenced by NL3D::CAnimation::applySampleDivisor().
| virtual bool NL3D::ITrack::applyTrackQuatHeaderCompressionPass0 | ( | CTrackSampleCounter & | ) | [inline, virtual] |
used by CAnimation to compress the header of CTrackSampledQuat supported only by CTrackSampledQuat
Reimplemented in NL3D::CTrackSampledQuat.
Definition at line 88 of file track.h.
Referenced by NL3D::CAnimation::applyTrackQuatHeaderCompression().
| virtual ITrack* NL3D::ITrack::applyTrackQuatHeaderCompressionPass1 | ( | uint & | , | |
| CTrackSamplePack & | ||||
| ) | [inline, virtual] |
Reimplemented in NL3D::CTrackSampledQuat.
Definition at line 89 of file track.h.
Referenced by NL3D::CAnimation::applyTrackQuatHeaderCompression().
| virtual const IAnimatedValue& NL3D::ITrack::eval | ( | const TAnimationTime & | date, | |
| CAnimatedValueBlock & | avBlock | |||
| ) | [pure virtual] |
Evaluation of the value of the track for this time.
The result is stored in CAnimatedValueBlock to simplify access at the polymorphic values. The track choose which value to assign, and return the one modified
Implemented in NL3D::ITrackKeyFramer< CKeyT >, NL3D::CTrackSampledQuat, NL3D::CTrackSampledQuatSmallHeader, NL3D::CTrackSampledVector, NL3D::ITrackKeyFramer< CKeyBezierVector >, NL3D::ITrackKeyFramer< CKeyTCBVector >, NL3D::ITrackKeyFramer< CKeyVector >, NL3D::ITrackKeyFramer< CKeyTCBQuat >, NL3D::ITrackKeyFramer< CKeyRGBA >, NL3D::ITrackKeyFramer< CKeyInt >, NL3D::ITrackKeyFramer< CKeyBool >, NL3D::ITrackKeyFramer< CKeyFloat >, NL3D::ITrackKeyFramer< CKeyQuat >, NL3D::ITrackKeyFramer< CKeyBezierFloat >, NL3D::ITrackKeyFramer< CKeyTCBFloat >, NL3D::ITrackKeyFramer< CKeyString >, and NL3D::ITrackKeyFramer< CKeyBezierQuat >.
Referenced by interpolate().
| virtual bool NL3D::ITrack::getLoopMode | ( | ) | const [pure virtual] |
get LoopMode.
2 mode only: "constant" (<=>false), and "loop" (<=> true). NB: same mode if time < getBeginTIme() and if time > getEndTime()
Implemented in NL3D::ITrackDefault, NL3D::ITrackKeyFramer< CKeyT >, NL3D::CTrackSampledCommon, NL3D::CTrackSampledQuatSmallHeader, NL3D::ITrackKeyFramer< CKeyBezierVector >, NL3D::ITrackKeyFramer< CKeyTCBVector >, NL3D::ITrackKeyFramer< CKeyVector >, NL3D::ITrackKeyFramer< CKeyTCBQuat >, NL3D::ITrackKeyFramer< CKeyRGBA >, NL3D::ITrackKeyFramer< CKeyInt >, NL3D::ITrackKeyFramer< CKeyBool >, NL3D::ITrackKeyFramer< CKeyFloat >, NL3D::ITrackKeyFramer< CKeyQuat >, NL3D::ITrackKeyFramer< CKeyBezierFloat >, NL3D::ITrackKeyFramer< CKeyTCBFloat >, NL3D::ITrackKeyFramer< CKeyString >, and NL3D::ITrackKeyFramer< CKeyBezierQuat >.
Referenced by NL3D::CAnimationOptimizer::optimizeTrack().
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| bool & | res | |||
| ) | [virtual] |
Interplation a bool value.
You should be sure that the track you use to interpolate your value is a bool track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 191 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueNotBlendable< T >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| std::string & | res | |||
| ) | [virtual] |
Interplation a string value.
You should be sure that the track you use to interpolate your value is a string track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 169 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueNotBlendable< T >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| NLMISC::CQuat & | res | |||
| ) | [virtual] |
Interplation a CQuat value.
You should be sure that the track you use to interpolate your value is a CQuat track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 147 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueBlendable< NLMISC::CQuat >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| NLMISC::CVector & | res | |||
| ) | [virtual] |
Interplation a CVector value.
You should be sure that the track you use to interpolate your value is a CVector track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 125 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueBlendable< T >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| NLMISC::CRGBA & | res | |||
| ) | [virtual] |
Interplation a CRGBA value.
You should be sure that the track you use to interpolate your value is an CRGBA track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 103 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueBlendable< NLMISC::CRGBA >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| sint32 & | res | |||
| ) | [virtual] |
Interplation an integer value.
You should be sure that the track you use to interpolate your value is an integer track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 81 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueBlendable< T >::Value.
| bool NL3D::ITrack::interpolate | ( | TAnimationTime | time, | |
| float & | res | |||
| ) | [virtual] |
Interplation a float value.
You should be sure that the track you use to interpolate your value is a float track! An assertion will be raised in debug if the type is wrong.
| time | is the time you want the evaluate the value. If time higher than the time gived by getEndTime (), the value returned is the interpolation value at getEndTime (). If time smaller than the time gived by getBeginTime (), the value returned is the interpolation value at getBeginTime (). | |
| res | is the reference on the value to get the result. |
Implements NL3D::UTrack.
Definition at line 59 of file track.cpp.
References NL3D::AnimatedValueBlock, eval(), NL3D_HAUTO_UTRACK_INTERPOLATE, and NL3D::CAnimatedValueBlendable< T >::Value.
1.6.1