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/a03568.html | 1770 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1770 insertions(+) create mode 100644 docs/doxygen/nel/a03568.html (limited to 'docs/doxygen/nel/a03568.html') diff --git a/docs/doxygen/nel/a03568.html b/docs/doxygen/nel/a03568.html new file mode 100644 index 00000000..adc2d0a5 --- /dev/null +++ b/docs/doxygen/nel/a03568.html @@ -0,0 +1,1770 @@ + + +NeL: NL3D::CTrackKeyFramerConstQuat class Reference + + + +
+

NL3D::CTrackKeyFramerConstQuat Class Reference

#include <track_keyframer.h> +

+

Inheritance diagram for NL3D::CTrackKeyFramerConstQuat: +

+ +NL3D::CTrackKeyFramerConstBlendable< CKeyQuat, CQuat > +NL3D::ITrackKeyFramer< CKeyQuat > +NL3D::ITrack +NL3D::UTrackKeyframer +NLMISC::IStreamable +NL3D::UTrack +NLMISC::IClassable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

typedef std::map< TAnimationTime,
+ CKeyQuat
TMapTimeCKey

Public Member Functions

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

void addKey (const CKeyQuat &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 void evalKey (const CKeyQuat *previous, const CKeyQuat *next, TAnimationTime datePrevious, TAnimationTime dateNext, TAnimationTime date)
 From ITrackKeyFramer.

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 (CTrackKeyFramerConstQuat)
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 Member Functions

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


Protected Attributes

TMapTimeCKey _MapKey
+

Member Typedef Documentation

+

+ + + + +
+ + +
typedef std::map<TAnimationTime, CKeyQuat > NL3D::ITrackKeyFramer< CKeyQuat >::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;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::ITrackKeyFramer< CKeyQuat >::addKey const CKeyQuat 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;}
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::ITrackKeyFramer< CKeyQuat >::compile  )  [inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+Precalc keyframe runtime infos for interpolation (OODTime...). All keys should be processed. This is called by eval when necessary. Deriver should call ITrackKeyFramer::compile() first, to compile basic Key runtime info. +

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

+

00303         {
+00304                 float   timeFirstKey;
+00305                 float   timeLastKey;
+00306 
+00307                 // Compute time of first/last key.
+00308                 if( !_MapKey.empty() )
+00309                 {
+00310                         typename TMapTimeCKey::const_iterator ite;
+00311 
+00312                         // Get first key
+00313                         ite=_MapKey.begin ();
+00314                         timeFirstKey= ite->first;
+00315 
+00316                         // Get last key
+00317                         ite=_MapKey.end ();
+00318                         ite--;
+00319                         timeLastKey= ite->first;
+00320                 }
+00321                 else
+00322                 {
+00323                         timeFirstKey= 0.0f;
+00324                         timeLastKey= 0.0f;
+00325                 }
+00326 
+00327 
+00328                 // Compute RangeBegin / RangeEnd. (if not user provided).
+00329                 if(_RangeLock)
+00330                 {
+00331                         _RangeBegin= timeFirstKey;
+00332                         _RangeEnd= timeLastKey;
+00333                 }
+00334 
+00335 
+00336                 // Compute _RangeDelta.
+00337                 if(_RangeLock)
+00338                 {
+00339                         _RangeDelta= 0;
+00340                 }
+00341                 else
+00342                 {
+00343                         _RangeDelta= (_RangeEnd - _RangeBegin) - (timeLastKey - timeFirstKey);
+00344                 }
+00345 
+00346                 // Misc range.
+00347                 _TotalRange= _RangeEnd - _RangeBegin;
+00348                 if(_TotalRange>0.0f)
+00349                         _OOTotalRange= 1.0f/_TotalRange;
+00350                 // start of loop / ned.
+00351                 _LoopStart= timeFirstKey;
+00352                 _LoopEnd= timeFirstKey + _TotalRange;
+00353 
+00354 
+00355                 // After _RangeDelta computed, compute OO delta times.
+00356                 typename TMapTimeCKey::iterator it= _MapKey.begin();
+00357                 for(;it!=_MapKey.end();it++)
+00358                 {
+00359                         typename TMapTimeCKey::iterator next= it;
+00360                         next++;
+00361                         if(next!=_MapKey.end())
+00362                                 it->second.OODeltaTime= 1.0f/(next->first - it->first);
+00363                         else if(_RangeDelta>0.0f)
+00364                                 // after last key, must slerp to first key.
+00365                                 it->second.OODeltaTime= 1.0f/_RangeDelta;
+00366                         else
+00367                                 it->second.OODeltaTime= 0.0f;
+00368                 }
+00369 
+00370         }
+
+

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

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ITrackKeyFramer< CKeyQuat >::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         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CTrackKeyFramerConstBlendable< CKeyQuat , CQuat >::evalKey const CKeyQuat previous,
const CKeyQuat next,
TAnimationTime  datePrevious,
TAnimationTime  dateNext,
TAnimationTime  date
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+From ITrackKeyFramer. +

+ +

+Implements NL3D::ITrackKeyFramer< CKeyQuat >. +

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

+References NL3D::copyToValue(), and NL3D::TAnimationTime. +

+

00485         {
+00486                 // Const key.
+00487                 if (previous)
+00488                         copyToValue(_Value.Value, previous->Value);
+00489                 else
+00490                         if (next)
+00491                                 copyToValue(_Value.Value, next->Value);
+00492         }
+
+

+ + + + +
+ + + + + + + + + +
virtual TAnimationTime NL3D::ITrackKeyFramer< CKeyQuat >::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().

+

+ + + + +
+ + + + + + + + + +
float NL3D::ITrackKeyFramer< CKeyQuat >::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         }
+
+

+ + + + +
+ + + + + + + + + +
virtual TAnimationTime NL3D::ITrackKeyFramer< CKeyQuat >::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         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::ITrackKeyFramer< CKeyQuat >::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.

+

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

+get LoopMode. From ITrack +

+ +

+Implements NL3D::ITrack. +

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

+

00133 {return _LoopMode;}
+
+

+ + + + +
+ + + + + + + + + +
TAnimationTime NL3D::ITrackKeyFramer< CKeyQuat >::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         }
+
+

+ + + + +
+ + + + + + + + + +
virtual const IAnimatedValue& NL3D::CTrackKeyFramerConstBlendable< CKeyQuat , CQuat >::getValue  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+From ITrack. +

+ +

+Implements NL3D::ITrack. +

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

+

00477         {
+00478                 return _Value;
+00479         }
+
+

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

+

+ + + + +
+ + + + + + + + + +
bool NL3D::ITrackKeyFramer< CKeyQuat >::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;}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::ITrackKeyFramer< CKeyQuat >::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::CTrackKeyFramerConstQuat::NLMISC_DECLARE_CLASS CTrackKeyFramerConstQuat   ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ITrackKeyFramer< CKeyQuat >::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         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::ITrackKeyFramer< CKeyQuat >::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;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::ITrackKeyFramer< CKeyQuat >::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

+

+ + + + +
+ + +
TMapTimeCKey NL3D::ITrackKeyFramer< CKeyQuat >::_MapKey [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 287 of file track_keyframer.h.

+


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