#include <animated_lightmap.h>
Inheritance diagram for NL3D::CAnimatedLightmap:
Nevrax France
Definition at line 47 of file animated_lightmap.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 | |
NLMISC::CRGBA | getFactor (uint group) const |
std::string | getName () const |
void | setName (const std::string &s) |
void | updateGroupColors (class NL3D::CScene &scene) |
ctor / setup. | |
CAnimatedLightmap (uint lightmapGroup) | |
virtual | ~CAnimatedLightmap () |
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 | |
CTrackDefaultRGBA | _DefaultFactor |
CAnimatedValueRGBA | _Factor |
std::vector< NLMISC::CRGBA > | _GroupColor |
std::string | _Name |
|
Added values.
Reimplemented from NL3D::IAnimatable. Definition at line 63 of file animated_lightmap.h.
00064 { 00065 OwnerBit= IAnimatable::AnimValueLast, 00066 FactorValue, 00067 AnimValueLast 00068 }; |
|
Constructor. Definition at line 45 of file animated_lightmap.cpp. References _DefaultFactor, _Factor, _GroupColor, NL3D::CAnimatedValueBlendable< T >::affect(), NL3D::CTrackDefaultBlendable< T >::getValue(), NL3D::CTrackDefaultBlendable< T >::setValue(), and uint.
00046 { 00047 // IAnimatable. 00048 IAnimatable::resize( AnimValueLast ); 00049 00050 _DefaultFactor.setValue( CRGBA(255,0,255,255) ); 00051 _Factor.affect( _DefaultFactor.getValue() ); 00052 _GroupColor.resize (lightmapGroup, CRGBA::White); 00053 } |
|
Constructor. Definition at line 56 of file animated_lightmap.h.
00056 {} |
|
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(), NL3D::CAnimatedMorph::registerToChannelMixer(), NL3D::CAnimatedMaterial::registerToChannelMixer(), and 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 125 of file animated_lightmap.cpp. References _DefaultFactor, FactorValue, nlstop, and uint. Referenced by NL3D::CScene::setAutomaticAnimationSet().
00126 { 00127 //nlassert(_LightmapBase); 00128 00129 switch(valueId) 00130 { 00131 case FactorValue: return &_DefaultFactor; 00132 }; 00133 00134 // should not be here!! 00135 nlstop; 00136 return NULL; 00137 } |
|
Definition at line 90 of file animated_lightmap.h. References _Factor, _GroupColor, uint, and NL3D::CAnimatedValueBlendable< T >::Value.
00091 { 00092 if (group < _GroupColor.size ()) 00093 return _GroupColor[group]; 00094 else 00095 return _Factor.Value; 00096 } |
|
Definition at line 85 of file animated_lightmap.h. References _Name. Referenced by NL3D::CScene::setAutomaticAnimationSet().
00085 { return _Name; } |
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 101 of file animated_lightmap.cpp. References _Factor, FactorValue, nlstop, and uint. Referenced by NL3D::CScene::setAutomaticAnimationSet().
00102 { 00103 switch(valueId) 00104 { 00105 case FactorValue: return &_Factor; 00106 }; 00107 00108 // should not be here!! 00109 nlstop; 00110 return NULL; 00111 } |
|
From IAnimatable.
Implements NL3D::IAnimatable. Definition at line 113 of file animated_lightmap.cpp. References FactorValue, nlstop, and uint.
00114 { 00115 switch(valueId) 00116 { 00117 case FactorValue: nlstop; return "???"; 00118 }; 00119 00120 // should not be here!! 00121 nlstop; 00122 return ""; 00123 } |
|
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 139 of file animated_lightmap.cpp. References NL3D::IAnimatable::addValue(), FactorValue, and OwnerBit.
00140 { 00141 // For CAnimatedLightmap, channels are detailled (Lightmap rendered after clip)! 00142 addValue(chanMixer, FactorValue, OwnerBit, prefix, true); 00143 00144 } |
|
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 } |
|
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 84 of file animated_lightmap.h. Referenced by NL3D::CScene::setAutomaticAnimationSet().
|
|
|
Definition at line 148 of file animated_lightmap.cpp. References _Factor, _GroupColor, count, uint, and NL3D::CAnimatedValueBlendable< T >::Value.
00149 { 00150 // For each colors 00151 const uint count = scene.getNumLightGroup (); 00152 _GroupColor.resize (count); 00153 uint i; 00154 for (i=0; i<count; i++) 00155 { 00156 _GroupColor[i].modulateFromColor (scene.getLightmapGroupColor (i), _Factor.Value); 00157 } 00158 } |
|
Definition at line 106 of file animated_lightmap.h. Referenced by CAnimatedLightmap(), and getDefaultTrack(). |
|
Definition at line 105 of file animated_lightmap.h. Referenced by CAnimatedLightmap(), getFactor(), getValue(), and updateGroupColors(). |
|
Definition at line 107 of file animated_lightmap.h. Referenced by CAnimatedLightmap(), getFactor(), and updateGroupColors(). |
|
Definition at line 101 of file animated_lightmap.h. |