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/a03541.html | 995 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 995 insertions(+) create mode 100644 docs/doxygen/nel/a03541.html (limited to 'docs/doxygen/nel/a03541.html') diff --git a/docs/doxygen/nel/a03541.html b/docs/doxygen/nel/a03541.html new file mode 100644 index 00000000..17c2fa43 --- /dev/null +++ b/docs/doxygen/nel/a03541.html @@ -0,0 +1,995 @@ + + +NeL: TemplateNL3D::CTrackDefaultBlendable< T > class Reference + + + +
+

NL3D::CTrackDefaultBlendable< T > Class Template Reference

#include <track.h> +

+

Inheritance diagram for NL3D::CTrackDefaultBlendable< T >: +

+ +NL3D::ITrackDefault +NL3D::ITrack +NLMISC::IStreamable +NL3D::UTrack +NLMISC::IClassable +NL3D::CTrackDefaultRGBA + +

Detailed Description

+

template<class T>
+ class NL3D::CTrackDefaultBlendable< T >

+ +ITrackDefault implementation for blendable values.

+The ITrack and animated value types MUST match else assertions will be raised.

+

Author:
Cyril 'Hulud' Corvazier

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 149 of file track.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 CTrackDefaultBlendable (const T &val)
 CTrackDefaultBlendable ()
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.

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

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


Private Attributes

CAnimatedValueBlendable< T > _Value
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + + + + +
+template<class T>
NL3D::CTrackDefaultBlendable< T >::CTrackDefaultBlendable  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 153 of file track.h. +

+

00154         {
+00155         }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<class T>
NL3D::CTrackDefaultBlendable< T >::CTrackDefaultBlendable const T &  val  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 156 of file track.h. +

+

00157         {
+00158                 _Value.Value= val;
+00159         }
+
+


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

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

+From ITrack. Return a const value. +

+ +

+Implements NL3D::ITrack. +

+Definition at line 169 of file track.h. +

+Referenced by NL3D::CAnimatedLightmap::CAnimatedLightmap(). +

+

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.

+

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

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

+ + + + +
+ + + + + + + + + + + + + +
+template<class T>
void NL3D::CTrackDefaultBlendable< T >::setValue const T &  val  )  [inline]
+
+ + + + + +
+   + + +

+set the default value. +

+ +

+Definition at line 162 of file track.h. +

+Referenced by NL3D::CAnimatedLightmap::CAnimatedLightmap(), NL3D::CMaterialBase::CMaterialBase(), NL3D::CMeshBase::CMeshBase(), and NL3D::CMaterialBase::copyFromMaterial(). +

+

00163         {
+00164                 _Value.Value= val;
+00165         }
+
+


Field Documentation

+

+ + + + +
+ + + + + +
+template<class T>
CAnimatedValueBlendable<T> NL3D::CTrackDefaultBlendable< T >::_Value [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 186 of file track.h.

+


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