#include <animated_material.h>
Inheritance diagram for NL3D::CMaterialBase:
Nevrax France
Definition at line 51 of file animated_material.h.
|
Definition at line 143 of file animated_material.h. |
|
Definition at line 63 of file animated_material.cpp. References DefaultAmbient, DefaultDiffuse, DefaultEmissive, DefaultOpacity, DefaultShininess, DefaultSpecular, DefaultTexAnimTracks, DefaultTexture, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::CMaterialBase::CTexAnimTracks::setDefaultValue(), NL3D::CTrackDefaultBlendable< sint32 >::setValue(), NL3D::CTrackDefaultBlendable< float >::setValue(), NL3D::CTrackDefaultBlendable< T >::setValue(), and uint.
00064 { 00065 DefaultAmbient.setValue(CRGBA(64,64,64)); 00066 DefaultDiffuse.setValue(CRGBA(128,128,128)); 00067 DefaultSpecular.setValue(CRGBA(0,0,0)); 00068 DefaultShininess.setValue(10); 00069 DefaultEmissive.setValue(CRGBA(128,128,128)); 00070 DefaultOpacity.setValue(1); 00071 DefaultTexture.setValue(0x7FFFFFFF); 00072 for (uint k = 0; k < IDRV_MAT_MAXTEXTURES; ++k) 00073 { 00074 DefaultTexAnimTracks[k].setDefaultValue(); 00075 } 00076 } |
|
|
return the texture for this Id. return NULL either if NULL texture for this id or if(!validAnimatedTexture()).
Definition at line 139 of file animated_material.cpp. References _AnimatedTextures, and uint32.
00140 { 00141 TAnimatedTextureMap::iterator it; 00142 it= _AnimatedTextures.find(id); 00143 if( it!=_AnimatedTextures.end() ) 00144 return it->second.Texture; 00145 else 00146 return NULL; 00147 } |
|
Definition at line 70 of file smart_ptr.h. References NLMISC::CRefCount::crefs, and sint.
00071 { 00072 return crefs; 00073 } |
|
save/load.
Definition at line 80 of file animated_material.cpp. References _AnimatedTextures, DefaultAmbient, DefaultDiffuse, DefaultEmissive, DefaultOpacity, DefaultShininess, DefaultSpecular, DefaultTexAnimTracks, DefaultTexture, NL3D::IDRV_MAT_MAXTEXTURES, Name, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), sint, and uint.
00081 { 00082 sint ver= f.serialVersion(1); 00083 00084 f.serial(Name); 00085 f.serial(DefaultAmbient, DefaultDiffuse, DefaultSpecular); 00086 f.serial(DefaultShininess, DefaultEmissive, DefaultOpacity, DefaultTexture); 00087 f.serialCont(_AnimatedTextures); 00088 if (ver > 0) 00089 { 00090 for (uint k = 0; k < IDRV_MAT_MAXTEXTURES; ++k) 00091 { 00092 f.serial(DefaultTexAnimTracks[k]); 00093 } 00094 } 00095 } |
|
assign a specific texture for an id (a uint32). It is a valid to give a NULL ptr (=> un textured). Sotred as a SmartPtr. Animated materials support Texture animation. This is the place where you define your list of texture. This list of animated texture is serialised. AnimatedMaterial animate texture with sint32 Tracks. If the id is not found in CMaterialBase, then the CMaterial texture is left as before. NB: id 0x7FFFFFFF is a reserved id, used as default to indicate no valid Animated texture. Definition at line 126 of file animated_material.cpp. References _AnimatedTextures, and uint32.
00127 { 00128 // add or replace the texture. 00129 _AnimatedTextures[id].Texture= pText; 00130 } |
|
is this Id valid?
Definition at line 132 of file animated_material.cpp. References _AnimatedTextures, and uint32.
00133 { 00134 TAnimatedTextureMap::iterator it; 00135 it= _AnimatedTextures.find(id); 00136 return it!=_AnimatedTextures.end(); 00137 } |
|
Definition at line 67 of file smart_ptr.h. |
|
Definition at line 144 of file animated_material.h. Referenced by getAnimatedTexture(), serial(), setAnimatedTexture(), and validAnimatedTexture(). |
|
Definition at line 79 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount(). |
|
Definition at line 72 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 73 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 76 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 77 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 75 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 74 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 109 of file animated_material.h. Referenced by CMaterialBase(), copyFromMaterial(), and serial(). |
|
Definition at line 78 of file animated_material.h. Referenced by CMaterialBase(), and serial(). |
|
Definition at line 68 of file animated_material.h. Referenced by serial(), and NL3D::CSegRemanenceShape::setAnimatedMaterial(). |
|
Referenced by NLMISC::CRefCount::CRefCount(). |
|
Definition at line 80 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount(). |