#include <animated_morph.h>
Inheritance diagram for NL3D::CAnimatedMorph:
Nevrax France
Definition at line 71 of file animated_morph.h.
Herited from IAnimatable | |
enum | TAnimValues { OwnerBit = IAnimatable::AnimValueLast, FactorValue, AnimValueLast } |
Added values. More... | |
virtual ITrack * | getDefaultTrack (uint valueId) |
From IAnimatable. | |
virtual IAnimatedValue * | getValue (uint valueId) |
From IAnimatable. | |
virtual const char * | getValueName (uint valueId) const |
From IAnimatable. | |
virtual void | registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix) |
From IAnimatable. | |
Public Types | |
Public Member Functions | |
float | getFactor () const |
const std::string & | getName () const |
void | setFactor (float rFactor) |
ctor / setup. | |
CAnimatedMorph (CMorphBase *mb) | |
Protected Member Functions | |
sint | addValue (CChannelMixer *chanMixer, uint valueId, uint ownerValueId, const std::string &prefix, bool detail) |
void | clearFlag (uint valueId) |
This method clear a bit in the bitset. | |
void | setFlag (uint valueId) |
This method set a bit in the bitset. | |
Private Attributes | |
CTrackDefaultFloat | _DefaultFactor |
CAnimatedValueFloat | _Factor |
CMorphBase * | _MorphBase |
|
Added values.
Reimplemented from NL3D::IAnimatable. Definition at line 86 of file animated_morph.h.
00087 { 00088 OwnerBit= IAnimatable::AnimValueLast, 00089 FactorValue, 00090 AnimValueLast 00091 }; |
|
Constructor. Definition at line 59 of file animated_morph.cpp. References _MorphBase, and NL3D::CAnimatedValueBlendable< float >::affect().
00060 { 00061 // IAnimatable. 00062 IAnimatable::resize (AnimValueLast); 00063 00064 _MorphBase = mb; 00065 00066 _Factor.affect (mb->DefaultFactor.getValue()); 00067 } |
|
This is a tool function which add a given value to a channel.
Definition at line 37 of file animatable.cpp. References NL3D::CChannelMixer::addChannel(), NL3D::IAnimatable::getDefaultTrack(), NL3D::IAnimatable::getValue(), NL3D::IAnimatable::getValueName(), nlassert, sint, and uint. Referenced by NL3D::CTransform::registerToChannelMixer(), NL3D::CParticleSystemModel::registerToChannelMixer(), NL3D::CCamera::registerToChannelMixer(), NL3D::CBone::registerToChannelMixer(), registerToChannelMixer(), NL3D::CAnimatedMaterial::registerToChannelMixer(), and NL3D::CAnimatedLightmap::registerToChannelMixer().
00038 { 00039 nlassert(chanMixer); 00040 return chanMixer->addChannel(prefix+getValueName(valueId), this, getValue(valueId), getDefaultTrack(valueId), valueId, ownerValueId, detail); 00041 } |
|
This method clear a bit in the bitset.
Definition at line 233 of file animatable.h. References NL3D::IAnimatable::_BitSet, and uint. Referenced by NL3D::ITransformable::clearTransformFlags(), NL3D::CParticleSystemModel::doAnimate(), and NL3D::CAnimatedMaterial::update().
00234 { 00235 _BitSet&= ~(1<<valueId); 00236 } |
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 90 of file animated_morph.cpp. References uint.
00091 { 00092 //nlassert(_morphBase); 00093 00094 switch(valueId) 00095 { 00096 case FactorValue: return &_DefaultFactor; 00097 }; 00098 00099 return NULL; 00100 } |
|
Definition at line 107 of file animated_morph.h. References NL3D::CAnimatedValueBlendable< float >::Value.
00107 { return _Factor.Value; } |
|
Definition at line 110 of file animated_morph.h. References _MorphBase, and NL3D::CMorphBase::Name.
00110 { return _MorphBase->Name; } |
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 70 of file animated_morph.cpp. References uint.
00071 { 00072 switch(valueId) 00073 { 00074 case FactorValue: return &_Factor; 00075 }; 00076 00077 return NULL; 00078 } |
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 80 of file animated_morph.cpp. References uint.
00081 { 00082 switch(valueId) 00083 { 00084 case FactorValue: return "MorphFactor"; 00085 }; 00086 00087 return ""; 00088 } |
|
Return non 0 int if the value as been touched else 0.
Definition at line 184 of file animatable.h. References NL3D::IAnimatable::_BitSet, uint, and uint32. Referenced by NL3D::CParticleSystemModel::doAnimate(), NL3D::ITransformable::needCompute(), NL3D::IAnimatable::propagateTouch(), and NL3D::CAnimatedMaterial::update().
00185 {
00186 return _BitSet&(1<<valueId);
00187 }
|
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 102 of file animated_morph.cpp. References NL3D::IAnimatable::addValue().
00103 { 00104 // For CAnimatedMorph, channels are detailled (morph evaluated after clip)! 00105 addValue(chanMixer, FactorValue, OwnerBit, prefix, true); 00106 00107 } |
|
Change value count, bit are set to 0
Definition at line 195 of file animatable.h. References count, nlassert, and uint.
00196 { 00197 // with the "uint32 _BitSet" implementation, juste check the size is correct 00198 nlassert(count<=32); 00199 } |
|
Definition at line 108 of file animated_morph.h. References NL3D::CAnimatedValueBlendable< float >::Value.
00108 { _Factor.Value = rFactor; } |
|
Say which (if any) IAnimatable owns this one. This is important for Touch propagation. By this system, Fathers and ancestors know if they must check their sons (isTouched() return true).
Definition at line 153 of file animatable.h. References NL3D::IAnimatable::_Father, NL3D::IAnimatable::_FatherOwnerBit, NL3D::IAnimatable::propagateTouch(), and uint. Referenced by NL3D::CMeshBase::instanciateMeshBase(), and NL3D::CSegRemanence::setAnimatedMaterial().
00154 { 00155 _Father= father; _FatherOwnerBit= fatherOwnerBit; 00156 00157 // propagate the touch to the fathers. 00158 propagateTouch(); 00159 } |
|
This method set a bit in the bitset.
Definition at line 239 of file animatable.h. References NL3D::IAnimatable::_BitSet, and uint. Referenced by NL3D::IAnimatable::propagateTouch(), and NL3D::IAnimatable::touch().
00240 { 00241 _BitSet|= (1<<valueId); 00242 } |
|
|
Definition at line 117 of file animated_morph.h. |
|
Definition at line 116 of file animated_morph.h. |
|
Definition at line 114 of file animated_morph.h. Referenced by CAnimatedMorph(), and getName(). |