NL3D::CTrackDefaultInt Class Reference

#include <track.h>

Inheritance diagram for NL3D::CTrackDefaultInt:

NL3D::CTrackDefaultBlendable< sint32 > NL3D::ITrackDefault NL3D::ITrack NLMISC::IStreamable NL3D::UTrack NLMISC::IClassable

Public Member Functions

 CTrackDefaultInt (const sint32 &v)
 CTrackDefaultInt ()
virtual void eval (const TAnimationTime &date)
 From ITrack. Does nothing, no interpolation.

TAnimationTime getBeginTime () const
virtual std::string getClassName ()=0
TAnimationTime getEndTime () const
virtual bool getLoopMode () const
virtual const IAnimatedValuegetValue () const
 From ITrack. Return a const value.

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

void setValue (const sint32 &val)
 set the default value.


Constructor & Destructor Documentation

NL3D::CTrackDefaultInt::CTrackDefaultInt  )  [inline]
 

Definition at line 267 of file track.h.

00271 : public CTrackDefaultBlendable<NLMISC::CRGBA>

NL3D::CTrackDefaultInt::CTrackDefaultInt const sint32 v  )  [inline]
 

Definition at line 267 of file track.h.

References sint32.

00271 : public CTrackDefaultBlendable<NLMISC::CRGBA>


Member Function Documentation

virtual void NL3D::ITrackDefault::eval const TAnimationTime date  )  [inline, virtual, inherited]
 

From ITrack. Does nothing, no interpolation.

Implements NL3D::ITrack.

Definition at line 116 of file track.h.

References NL3D::TAnimationTime.

00117         {}

TAnimationTime NL3D::ITrackDefault::getBeginTime  )  const [inline, virtual, inherited]
 

Get the begin time of the track

Implements NL3D::UTrack.

Definition at line 118 of file track.h.

References NL3D::TAnimationTime.

00119         {
00120                 return 0.f;
00121         }

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().

TAnimationTime NL3D::ITrackDefault::getEndTime  )  const [inline, virtual, inherited]
 

Get the end time of the track

Implements NL3D::UTrack.

Definition at line 122 of file track.h.

References NL3D::TAnimationTime.

00123         {
00124                 return 0.f;
00125         }

virtual bool NL3D::ITrackDefault::getLoopMode  )  const [inline, virtual, inherited]
 

get LoopMode. 2 mode only: "constant" (<=>false), and "loop" (<=> true). NB: same mode if time < getBeginTIme() and if time > getEndTime()

Implements NL3D::ITrack.

Definition at line 126 of file track.h.

00126 {return true;}

virtual const IAnimatedValue& NL3D::CTrackDefaultBlendable< sint32 >::getValue  )  const [inline, virtual, inherited]
 

From ITrack. Return a const value.

Implements NL3D::ITrack.

Definition at line 169 of file track.h.

00170         {
00171                 return _Value;
00172         }

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.

NL3D::CTrackDefaultInt::NLMISC_DECLARE_CLASS CTrackDefaultInt   ) 
 

virtual void NL3D::CTrackDefaultBlendable< sint32 >::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [inline, virtual, inherited]
 

Serial the template.

Implements NLMISC::IStreamable.

Definition at line 175 of file track.h.

00176         {
00177                 // Serial version
00178                 (void)f.serialVersion (0);
00179 
00180                 // Serial the value
00181                 f.serial (_Value.Value);
00182         }

void NL3D::CTrackDefaultBlendable< sint32 >::setValue const sint32 val  )  [inline, inherited]
 

set the default value.

Definition at line 162 of file track.h.

Referenced by NL3D::CMaterialBase::CMaterialBase().

00163         {
00164                 _Value.Value= val;
00165         }


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 08:06:19 2004 for NeL by doxygen 1.3.6