#include <animated_value.h>
Inheritance diagram for NL3D::CAnimatedValueBlendable< T >:
Nevrax France
Definition at line 77 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. | |
Data Fields | |
T | Value |
|
An assignation method. This method assign a values in the object.
Implements NL3D::IAnimatedValue. Definition at line 101 of file animated_value.h. Referenced by NL3D::CAnimatedLightmap::CAnimatedLightmap(), and NL3D::CAnimatedMaterial::CAnimatedMaterial().
00102 { 00103 // Check types of value. typeid is slow, assert only in debug 00104 #ifdef NL_DEBUG 00105 nlassert (typeid (value)==typeid(*this)); 00106 #endif 00107 00108 // Cast 00109 CAnimatedValueBlendable<T> *pValue=(CAnimatedValueBlendable<T>*)&value; 00110 00111 // Blend 00112 Value=pValue->Value; 00113 } |
|
A default blend method. Doesn't work for all type.
Implements NL3D::IAnimatedValue. Definition at line 82 of file animated_value.h.
00083 { 00084 // Check types of value. typeid is slow, assert only in debug 00085 #ifdef NL_DEBUG 00086 nlassert (typeid (value)==typeid(*this)); 00087 #endif 00088 00089 // Cast 00090 CAnimatedValueBlendable<T> *pValue=(CAnimatedValueBlendable<T>*)&value; 00091 00092 // Blend 00093 Value=(T) (Value*blendFactor+pValue->Value*(1.f-blendFactor)); 00094 } |
|