NL3D::CAnimatedValueNotBlendable< T > Class Template Reference

#include <animated_value.h>

Inheritance diagram for NL3D::CAnimatedValueNotBlendable< T >:

NL3D::IAnimatedValue

Detailed Description

template<class T>
class NL3D::CAnimatedValueNotBlendable< T >

A template implementation of IAnimatedValue not blendable.

Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2001

Definition at line 230 of file animated_value.h.

Public Member Functions

virtual void affect (const IAnimatedValue &value)
virtual void blend (const IAnimatedValue &value, float blendFactor)
 A default blend method. Doesn't work for all type.

virtual ~CAnimatedValueNotBlendable ()

Data Fields

Value


Constructor & Destructor Documentation

template<class T>
virtual NL3D::CAnimatedValueNotBlendable< T >::~CAnimatedValueNotBlendable  )  [inline, virtual]
 


Member Function Documentation

template<class T>
virtual void NL3D::CAnimatedValueNotBlendable< T >::affect const IAnimatedValue value  )  [inline, virtual]
 

An assignation method. This method assign a values in the object.

Parameters:
value is the new value.

Implements NL3D::IAnimatedValue.

Definition at line 255 of file animated_value.h.

00256         {
00257                 // Check types of value. typeid is slow, assert only in debug
00258 #ifdef NL_DEBUG
00259                 nlassert (typeid (value)==typeid(*this));
00260 #endif
00261 
00262                 // Cast
00263                 CAnimatedValueNotBlendable<T>   *pValue=(CAnimatedValueNotBlendable<T>*)&value;
00264 
00265                 // Blend
00266                 Value=pValue->Value;
00267         }

template<class T>
virtual void NL3D::CAnimatedValueNotBlendable< T >::blend const IAnimatedValue value,
float  blendFactor
[inline, virtual]
 

A default blend method. Doesn't work for all type.

Implements NL3D::IAnimatedValue.

Definition at line 235 of file animated_value.h.

00236         {
00237                 // Check types of value. typeid is slow, assert only in debug
00238 #ifdef NL_DEBUG
00239                 nlassert (typeid (value)==typeid(*this));
00240 #endif
00241 
00242                 // Cast
00243                 CAnimatedValueNotBlendable<T>   *pValue=(CAnimatedValueNotBlendable<T>*)&value;
00244 
00245                 // Boolean blend
00246                 if (blendFactor<0.5f)
00247                         Value=pValue->Value;
00248         }


Field Documentation

template<class T>
T NL3D::CAnimatedValueNotBlendable< T >::Value
 

Definition at line 270 of file animated_value.h.

Referenced by NL3D::CAnimatedValueNotBlendable< bool >::affect(), and NL3D::CAnimatedValueNotBlendable< bool >::blend().


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