From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a03586.html | 1805 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1805 insertions(+) create mode 100644 docs/doxygen/nel/a03586.html (limited to 'docs/doxygen/nel/a03586.html') diff --git a/docs/doxygen/nel/a03586.html b/docs/doxygen/nel/a03586.html new file mode 100644 index 00000000..1d12e61d --- /dev/null +++ b/docs/doxygen/nel/a03586.html @@ -0,0 +1,1805 @@ + + +NeL: NL3D::CTrackKeyFramerTCBQuat class Reference + + + +
+

NL3D::CTrackKeyFramerTCBQuat Class Reference

#include <track_keyframer.h> +

+

Inheritance diagram for NL3D::CTrackKeyFramerTCBQuat: +

+ +NL3D::CTrackKeyFramerTCB< CKeyT, T > +NL3D::ITrackKeyFramer< CKeyT > +NL3D::CTCBTools< CKeyT, T, TMapTimeCKey > +NL3D::ITrack +NL3D::UTrackKeyframer +NLMISC::IStreamable +NL3D::UTrack +NLMISC::IClassable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

typedef std::map< TAnimationTime,
+ CKeyT > 
TMapTimeCKey

Public Member Functions

virtual bool addBezierFloatKey (const UKeyBezierFloat &key)
 Fail if not A Float Bezier Keyframer.

void addKey (const CKeyT &key, TAnimationTime time)
virtual bool addLinearFloatKey (const UKeyLinearFloat &key)
 Fail if not A Float Linear Keyframer.

virtual bool addTCBFloatKey (const UKeyTCBFloat &key)
 Fail if not A Float TCB Keyframer.

virtual void eval (const TAnimationTime &inDate)
 From ITrack.

virtual TAnimationTime getBeginTime () const
virtual std::string getClassName ()=0
virtual TAnimationTime getEndTime () const
void getKeysInRange (TAnimationTime t1, TAnimationTime t2, std::vector< TAnimationTime > &result)
virtual bool getLoopMode () const
 get LoopMode. From ITrack

TAnimationTime getRangeDelta () const
 rangeDelta is (length of effective Range) - (length of LastKey-FirstKey). NB: if RangeLock, rangeDelta==0.

virtual const IAnimatedValuegetValue () const
 From ITrack.

bool isRangeLocked () const
 return true if Range is locked to first/last key. use getBeginTime and getEndTime to get the effective begin/end range times...

void lockRange ()
 range is computed from frist and last key time (default).

 NLMISC_DECLARE_CLASS (CTrackKeyFramerTCBQuat)
virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 Serial the template.

void setLoopMode (bool loop)
 set LoopMode. 2 mode only: "constant" (<=>false), and "loop" (<=> true). same mode for in and out...

void unlockRange (TAnimationTime begin, TAnimationTime end)
 set an explicit animation range. (see getBeginTime() / setEndTime() ).


Static Public Member Functions

UTrackKeyframercreateBezierFloatTrack ()
UTrackKeyframercreateLinearFloatTrack ()
UTrackKeyframercreateTCBFloatTrack ()

Protected Types

typedef CKeyT::TValueType TKeyValueType

Protected Member Functions

float getCompiledRangeDelta ()
 This is for Deriver compile(), because _RangeDelta (getRangeDelta()) is himself computed in compile().


Protected Attributes

TMapTimeCKey _MapKey
+

Member Typedef Documentation

+

+ + + + +
+ + + + + +
+template<class CKeyT, class T>
typedef CKeyT::TValueType NL3D::CTrackKeyFramerTCB< CKeyT, T >::TKeyValueType [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 874 of file track_keyframer.h.

+

+ + + + +
+ + + + + +
+template<class CKeyT>
typedef std::map<TAnimationTime, CKeyT> NL3D::ITrackKeyFramer< CKeyT >::TMapTimeCKey [inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 65 of file track_keyframer.h.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::UTrackKeyframer::addBezierFloatKey const UKeyBezierFloat key  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Fail if not A Float Bezier Keyframer. +

+ +

+Reimplemented in NL3D::CTrackKeyFramerBezierFloat. +

+Definition at line 220 of file u_track.h. +

+

00220 {return false;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+template<class CKeyT>
void NL3D::ITrackKeyFramer< CKeyT >::addKey const CKeyT &  key,
TAnimationTime  time
[inline, inherited]
+
+ + + + + +
+   + + +

+Add a key in the keyframer.

+The key passed is duplicated in the track.

+

Parameters:
+ + + +
key is the key value to add in the keyframer.
time is the time of the key to add in the keyframer.
+
+ +

+Definition at line 90 of file track_keyframer.h. +

+

00091         {
+00092                 // Insert the key in the map
+00093                 _MapKey.insert (TMapTimeCKey::value_type (time, key));
+00094 
+00095                 // must precalc at next eval.
+00096                 _Dirty= true;
+00097         }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::UTrackKeyframer::addLinearFloatKey const UKeyLinearFloat key  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Fail if not A Float Linear Keyframer. +

+ +

+Reimplemented in NL3D::CTrackKeyFramerLinearFloat. +

+Definition at line 218 of file u_track.h. +

+

00218 {return false;}
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::UTrackKeyframer::addTCBFloatKey const UKeyTCBFloat key  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Fail if not A Float TCB Keyframer. +

+ +

+Reimplemented in NL3D::CTrackKeyFramerTCBFloat. +

+Definition at line 222 of file u_track.h. +

+

00222 {return false;}
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT, class T>
virtual void NL3D::CTrackKeyFramerTCB< CKeyT, T >::compile  )  [inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+compile (precalc). +

+ +

+Reimplemented from NL3D::ITrackKeyFramer< CKeyT >. +

+Definition at line 912 of file track_keyframer.h.

+

+ + + + +
+ + + + + + + + + +
UTrackKeyframer * NL3D::UTrackKeyframer::createBezierFloatTrack  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 87 of file track_keyframer.cpp. +

+

00088 {
+00089         return new CTrackKeyFramerBezierFloat;
+00090 }
+
+

+ + + + +
+ + + + + + + + + +
UTrackKeyframer * NL3D::UTrackKeyframer::createLinearFloatTrack  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 83 of file track_keyframer.cpp. +

+

00084 {
+00085         return new CTrackKeyFramerLinearFloat;
+00086 }
+
+

+ + + + +
+ + + + + + + + + +
UTrackKeyframer * NL3D::UTrackKeyframer::createTCBFloatTrack  )  [static, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 91 of file track_keyframer.cpp. +

+

00092 {
+00093         return new CTrackKeyFramerTCBFloat;
+00094 }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<class CKeyT>
virtual void NL3D::ITrackKeyFramer< CKeyT >::eval const TAnimationTime inDate  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+From ITrack. +

+ +

+Implements NL3D::ITrack. +

+Definition at line 137 of file track_keyframer.h. +

+

00138         {
+00139                 float   date= inDate;
+00140                 const CKeyT *previous=NULL;
+00141                 const CKeyT *next=NULL;
+00142                 TAnimationTime datePrevious = 0;
+00143                 TAnimationTime dateNext = 0;
+00144 
+00145                 // must precalc ??
+00146                 testAndClean();
+00147 
+00148                 // No keys?
+00149                 if(_MapKey.empty())
+00150                         return;
+00151 
+00152 
+00153                 // Loop gestion.
+00154                 if(_LoopMode && _MapKey.size()>1 )
+00155                 {
+00156                         nlassert(_LoopEnd > _LoopStart);
+00157 
+00158                         // force us to be in interval [_LoopStart, _LoopEnd[.
+00159                         if( date<_LoopStart || date>=_LoopEnd )
+00160                         {
+00161                                 double  d= (date-_LoopStart)*_OOTotalRange;
+00162 
+00163                                 // floor(d) is the truncated number of loops.
+00164                                 d= date- floor(d)*_TotalRange;
+00165                                 date= (float)d;
+00166 
+00167                                 // For precision problems, ensure correct range.
+00168                                 if(date<_LoopStart || date >= _LoopEnd)
+00169                                         date= _LoopStart;
+00170                         }
+00171                 }
+00172 
+00173 
+00174                 // Return upper key
+00175                 typename TMapTimeCKey::iterator ite=_MapKey.upper_bound (date);
+00176 
+00177                 // First next ?
+00178                 if (ite!=_MapKey.end())
+00179                 {
+00180                         // Next
+00181                         next= &(ite->second);
+00182                         dateNext=ite->first;
+00183                 }
+00184                 // loop mgt.
+00185                 else if (_LoopMode && _MapKey.size()>1 )
+00186                 {
+00187                         // loop to first!!
+00188                         next= &(_MapKey.begin()->second);
+00189                         // must slerp from last to first, 
+00190                         dateNext= _LoopEnd;
+00191                 }
+00192                 else if (!_LoopMode && _MapKey.size()>=1 )
+00193                 {
+00194                         // clamp to the last
+00195                         typename TMapTimeCKey::iterator iteLast= ite;
+00196                         iteLast--;
+00197                         next= &(iteLast->second);
+00198                 }
+00199 
+00200 
+00201                 // First previous ?
+00202                 if ((!_MapKey.empty())&&(ite!=_MapKey.begin()))
+00203                 {
+00204                         if (ite!=_MapKey.end())
+00205                         {
+00206                                 // Previous
+00207                                 ite--;
+00208                                 previous= &(ite->second);
+00209                                 datePrevious=ite->first;
+00210                         }
+00211                 }
+00212                 else if (!_MapKey.empty())
+00213                 {
+00214                         // Clamp at beginTime
+00215                         next= &(ite->second);
+00216                         dateNext=ite->first;
+00217                 }
+00218 
+00219                 // Call evalutation fonction
+00220                 evalKey (previous, next, datePrevious, dateNext, date);
+00221         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+template<class CKeyT, class T>
virtual void NL3D::CTrackKeyFramerTCB< CKeyT, T >::evalKey const CKeyT *  previous,
const CKeyT *  next,
TAnimationTime  datePrevious,
TAnimationTime  dateNext,
TAnimationTime  date
[inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+evalKey (runtime). +

+ +

+Implements NL3D::ITrackKeyFramer< CKeyT >. +

+Definition at line 882 of file track_keyframer.h.

+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
virtual TAnimationTime NL3D::ITrackKeyFramer< CKeyT >::getBeginTime  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Get the begin time of the track +

+Implements NL3D::UTrack. +

+Definition at line 224 of file track_keyframer.h. +

+

00225         {
+00226                 // must precalc ??
+00227                 testAndClean();
+00228 
+00229                 return _RangeBegin;
+00230         }
+
+

+ + + + +
+ + + + + + + + + +
virtual std::string NLMISC::IClassable::getClassName  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. +

+Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize().

+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
float NL3D::ITrackKeyFramer< CKeyT >::getCompiledRangeDelta  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+This is for Deriver compile(), because _RangeDelta (getRangeDelta()) is himself computed in compile(). +

+ +

+Definition at line 291 of file track_keyframer.h. +

+

00292         {
+00293                 return _RangeDelta;
+00294         }
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
virtual TAnimationTime NL3D::ITrackKeyFramer< CKeyT >::getEndTime  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Get the end time of the track +

+Implements NL3D::UTrack. +

+Definition at line 231 of file track_keyframer.h. +

+

00232         {
+00233                 // must precalc ??
+00234                 testAndClean();
+00235 
+00236                 return _RangeEnd;
+00237         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+template<class T>
void NL3D::ITrackKeyFramer< T >::getKeysInRange TAnimationTime  t1,
TAnimationTime  t2,
std::vector< TAnimationTime > &  result
[virtual, inherited]
+
+ + + + + +
+   + + +

+From UTrackKeyframer, retrieve the keys that are in the given range [t1, t2] of the track

Parameters:
+ + +
result a vector that will be cleared, and filled with the date ofthe keys
+
+ +

+Implements NL3D::UTrackKeyframer. +

+Definition at line 35 of file track_keyframer.cpp. +

+References NL3D::ITrackKeyFramer< CKeyT >::_MapKey, nlassert, and NL3D::TAnimationTime. +

+

00036 {
+00037         nlassert(t1 <= t2);
+00038         typename TMapTimeCKey::const_iterator it = _MapKey.lower_bound(t1);
+00039         typename TMapTimeCKey::const_iterator ub = _MapKey.upper_bound(t2);
+00040         result.clear();         
+00041         while (it != ub)
+00042         {                       
+00043                 result.push_back(it->first);
+00044                 ++it;
+00045         }
+00046 }
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
virtual bool NL3D::ITrackKeyFramer< CKeyT >::getLoopMode  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+get LoopMode. From ITrack +

+ +

+Implements NL3D::ITrack. +

+Definition at line 133 of file track_keyframer.h. +

+

00133 {return _LoopMode;}
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
TAnimationTime NL3D::ITrackKeyFramer< CKeyT >::getRangeDelta  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+rangeDelta is (length of effective Range) - (length of LastKey-FirstKey). NB: if RangeLock, rangeDelta==0. +

+ +

+Definition at line 120 of file track_keyframer.h. +

+

00121         {
+00122                 // update track.
+00123                 testAndClean();
+00124 
+00125                 return _RangeDelta;
+00126         }
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT, class T>
virtual const IAnimatedValue& NL3D::CTrackKeyFramerTCB< CKeyT, T >::getValue  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+From ITrack. +

+ +

+Implements NL3D::ITrack. +

+Definition at line 866 of file track_keyframer.h.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
bool &  res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 202 of file track.cpp. +

+References NL3D::CAnimatedValueBool, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, NL3D::TAnimationTime, and value. +

+

00203 {
+00204         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00205 
+00206         // Evaluate it 
+00207         eval (time);
+00208 
+00209         // Get a pointer on the value
+00210         const CAnimatedValueBool *value=dynamic_cast<const CAnimatedValueBool*>(&getValue ());
+00211 
+00212         // Type is good ?
+00213         if (value)
+00214         {
+00215                 // Ok, return the value
+00216                 res=value->Value;
+00217                 return true;
+00218         }
+00219         else
+00220                 // No, return false
+00221                 return false;
+00222 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
std::string &  res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 178 of file track.cpp. +

+References NL3D::CAnimatedValueString, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, NL3D::TAnimationTime, and value. +

+

00179 {
+00180         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00181 
+00182         // Evaluate it 
+00183         eval (time);
+00184 
+00185         // Get a pointer on the value
+00186         const CAnimatedValueString *value=dynamic_cast<const CAnimatedValueString*>(&getValue ());
+00187 
+00188         // Type is good ?
+00189         if (value)
+00190         {
+00191                 // Ok, return the value
+00192                 res=value->Value;
+00193                 return true;
+00194         }
+00195         else
+00196                 // No, return false
+00197                 return false;
+00198 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
NLMISC::CQuat res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 154 of file track.cpp. +

+References NL3D::CAnimatedValueQuat, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, NL3D::TAnimationTime, and value. +

+

00155 {
+00156         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00157 
+00158         // Evaluate it 
+00159         eval (time);
+00160 
+00161         // Get a pointer on the value
+00162         const CAnimatedValueQuat *value=dynamic_cast<const CAnimatedValueQuat*>(&getValue ());
+00163 
+00164         // Type is good ?
+00165         if (value)
+00166         {
+00167                 // Ok, return the value
+00168                 res=value->Value;
+00169                 return true;
+00170         }
+00171         else
+00172                 // No, return false
+00173                 return false;
+00174 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
NLMISC::CVector res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 130 of file track.cpp. +

+References NL3D::CAnimatedValueVector, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, NL3D::TAnimationTime, and value. +

+

00131 {
+00132         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00133 
+00134         // Evaluate it 
+00135         eval (time);
+00136 
+00137         // Get a pointer on the value
+00138         const CAnimatedValueVector *value=dynamic_cast<const CAnimatedValueVector*>(&getValue ());
+00139 
+00140         // Type is good ?
+00141         if (value)
+00142         {
+00143                 // Ok, return the value
+00144                 res=value->Value;
+00145                 return true;
+00146         }
+00147         else
+00148                 // No, return false
+00149                 return false;
+00150 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
NLMISC::CRGBA res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 106 of file track.cpp. +

+References NL3D::CAnimatedValueRGBA, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, NL3D::TAnimationTime, and value. +

+

00107 {
+00108         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00109 
+00110         // Evaluate it 
+00111         eval (time);
+00112 
+00113         // Get a pointer on the value
+00114         const CAnimatedValueRGBA *value=dynamic_cast<const CAnimatedValueRGBA*>(&getValue ());
+00115 
+00116         // Type is good ?
+00117         if (value)
+00118         {
+00119                 // Ok, return the value
+00120                 res=value->Value;
+00121                 return true;
+00122         }
+00123         else
+00124                 // No, return false
+00125                 return false;
+00126 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::ITrack::interpolate TAnimationTime  time,
sint32 res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack. +

+Definition at line 82 of file track.cpp. +

+References NL3D::CAnimatedValueInt, NL3D::ITrack::eval(), NL3D::ITrack::getValue(), NL3D_HAUTO_UTRACK_INTERPOLATE, res, sint32, NL3D::TAnimationTime, and value. +

+

00083 {
+00084         NL3D_HAUTO_UTRACK_INTERPOLATE;
+00085 
+00086         // Evaluate it 
+00087         eval (time);
+00088 
+00089         // Get a pointer on the value
+00090         const CAnimatedValueInt *value=dynamic_cast<const CAnimatedValueInt*>(&getValue ());
+00091 
+00092         // Type is good ?
+00093         if (value)
+00094         {
+00095                 // Ok, return the value
+00096                 res=value->Value;
+00097                 return true;
+00098         }
+00099         else
+00100                 // No, return false
+00101                 return false;
+00102 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual bool NL3D::ITrack::interpolate TAnimationTime  time,
float &  res
[virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

Parameters:
+ + + +
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.
+
+
Returns:
true if interplation is successful. false if the type asked is wrong.
+ +

+Implements NL3D::UTrack.

+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
bool NL3D::ITrackKeyFramer< CKeyT >::isRangeLocked  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return true if Range is locked to first/last key. use getBeginTime and getEndTime to get the effective begin/end range times... +

+ +

+Definition at line 116 of file track_keyframer.h. +

+

00116 {return _RangeLock;}
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<class CKeyT>
void NL3D::ITrackKeyFramer< CKeyT >::lockRange  )  [inline, inherited]
+
+ + + + + +
+   + + +

+range is computed from frist and last key time (default). +

+ +

+Definition at line 109 of file track_keyframer.h. +

+

00110         {
+00111                 _RangeLock= true;
+00112                 _Dirty= true;
+00113         }
+
+

+ + + + +
+ + + + + + + + + + +
NL3D::CTrackKeyFramerTCBQuat::NLMISC_DECLARE_CLASS CTrackKeyFramerTCBQuat   ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + +
+template<class CKeyT>
virtual void NL3D::ITrackKeyFramer< CKeyT >::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Serial the template. +

+ +

+Implements NLMISC::IStreamable. +

+Definition at line 241 of file track_keyframer.h. +

+

00242         {
+00243                 // Serial version
+00244                 (void)f.serialVersion (0);
+00245 
+00246                 f.serialCont(_MapKey);
+00247                 f.serial(_RangeLock, _RangeBegin, _RangeEnd);
+00248                 f.serial(_LoopMode);
+00249 
+00250                 if(f.isReading())
+00251                         _Dirty= true;
+00252         }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<class CKeyT>
void NL3D::ITrackKeyFramer< CKeyT >::setLoopMode bool  loop  )  [inline, inherited]
+
+ + + + + +
+   + + +

+set LoopMode. 2 mode only: "constant" (<=>false), and "loop" (<=> true). same mode for in and out... +

+ +

+Definition at line 130 of file track_keyframer.h. +

+

00130 {_LoopMode= loop; _Dirty= true;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+template<class CKeyT>
void NL3D::ITrackKeyFramer< CKeyT >::unlockRange TAnimationTime  begin,
TAnimationTime  end
[inline, inherited]
+
+ + + + + +
+   + + +

+set an explicit animation range. (see getBeginTime() / setEndTime() ). +

+ +

+Definition at line 100 of file track_keyframer.h. +

+

00101         {
+00102                 _RangeLock= false;
+00103                 _RangeBegin= begin;
+00104                 _RangeEnd= end;
+00105                 _Dirty= true;
+00106         }
+
+


Field Documentation

+

+ + + + +
+ + + + + +
+template<class CKeyT>
TMapTimeCKey NL3D::ITrackKeyFramer< CKeyT >::_MapKey [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 287 of file track_keyframer.h. +

+Referenced by NL3D::ITrackKeyFramer< CKeyT >::getKeysInRange().

+


The documentation for this class was generated from the following file: +
Generated on Tue Mar 16 08:12:55 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1