|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CAnimatedMaterial Class ReferenceAn animated material Instance of CMaterialBase NB: formated for 3ds Max :).
More...
#include <animated_material.h>
Inheritance diagram for NL3D::CAnimatedMaterial:
List of all members.
Herited from IAnimatable |
enum | TAnimValues {
OwnerBit = IAnimatable::AnimValueLast,
AmbientValue,
DiffuseValue,
SpecularValue,
ShininessValue,
EmissiveValue,
OpacityValue,
TextureValue,
TextureMatValues,
AnimValueLast = TextureMatValues + NumTexAnimatedValues * IDRV_MAT_MAXTEXTURES
} |
| Added values. More...
|
virtual IAnimatedValue * | getValue (uint valueId) |
| From IAnimatable. More...
|
virtual const char * | getValueName (uint valueId) const |
| From IAnimatable. More...
|
virtual ITrack * | getDefaultTrack (uint valueId) |
| From IAnimatable. More...
|
virtual void | registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix) |
| From IAnimatable. More...
|
Public Types |
enum | { NumTexAnimatedValues = CMaterialBase::CTexAnimTracks::NumTexAnimatedValues
} |
| number of animated values for each animated texture, taken from CMaterialBase. More...
|
Public Methods |
void | update () |
| Check if The animated material is touched, and if necessary update the stored material (if any). More...
|
|
| CAnimatedMaterial (CMaterialBase *baseMat) |
| Constructor. More...
|
void | setMaterial (CMaterial *pMat) |
| setup the material context for this animated material. More...
|
std::string | getMaterialName () const |
| Return the name of this material (stored in CMaterialBase). More...
|
Static Public Methods |
|
const char * | getAmbientValueName () |
const char * | getDiffuseValueName () |
const char * | getSpecularValueName () |
const char * | getShininessValueName () |
const char * | getEmissiveValueName () |
const char * | getOpacityValueName () |
const char * | getTextureValueName () |
const char * | getTexMatUTransName (uint stage) |
const char * | getTexMatVTransName (uint stage) |
const char * | getTexMatUScaleName (uint stage) |
const char * | getTexMatVScaleName (uint stage) |
const char * | getTexMatWRotName (uint stage) |
Private Attributes |
CRefPtr< CMaterialBase > | _MaterialBase |
CRefPtr< CMaterial > | _Material |
CAnimatedValueRGBA | _Ambient |
CAnimatedValueRGBA | _Diffuse |
CAnimatedValueRGBA | _Specular |
CAnimatedValueFloat | _Shininess |
CAnimatedValueRGBA | _Emissive |
CAnimatedValueFloat | _Opacity |
CAnimatedValueInt | _Texture |
CTexAnimatedMatValues | _TexAnimatedMatValues [IDRV_MAT_MAXTEXTURES] |
Detailed Description
An animated material Instance of CMaterialBase NB: formated for 3ds Max :).
Emissive anim is a float, with a constant RGB factor. Texture animation: see update(). -
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2001
Definition at line 159 of file animated_material.h.
Member Enumeration Documentation
enum NL3D::CAnimatedMaterial::TAnimValues
|
|
|
Added values.
-
Enumeration values:
-
OwnerBit |
|
AmbientValue |
|
DiffuseValue |
|
SpecularValue |
|
ShininessValue |
|
EmissiveValue |
|
OpacityValue |
|
TextureValue |
|
TextureMatValues |
|
AnimValueLast |
|
Reimplemented from NL3D::IAnimatable.
Definition at line 217 of file animated_material.h. |
Constructor & Destructor Documentation
NL3D::CAnimatedMaterial::CAnimatedMaterial |
( |
CMaterialBase * |
baseMat |
) |
|
|
|
Constructor.
This ctor:
- store a RefPtr on the BaseMaterial (for getDefaultTracks() method).
- copy the material default track value into Animated Values.
Definition at line 159 of file animated_material.cpp.
References _Ambient, _Diffuse, _Emissive, _MaterialBase, _Opacity, _Shininess, _Specular, _TexAnimatedMatValues, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::affect, AnimValueLast, NL3D::IDRV_MAT_MAXTEXTURES, and nlassert. |
Member Function Documentation
const char* NL3D::CAnimatedMaterial::getAmbientValueName |
( |
|
) |
[inline, static] |
|
ITrack * NL3D::CAnimatedMaterial::getDefaultTrack |
( |
uint |
valueId |
) |
[virtual] |
|
|
From IAnimatable.
Implements NL3D::IAnimatable.
Definition at line 350 of file animated_material.cpp.
References _MaterialBase, AmbientValue, AnimValueLast, DiffuseValue, EmissiveValue, nlassert, nlstop, NumTexAnimatedValues, OpacityValue, ShininessValue, SpecularValue, TextureMatValues, and TextureValue. |
const char* NL3D::CAnimatedMaterial::getDiffuseValueName |
( |
|
) |
[inline, static] |
|
const char* NL3D::CAnimatedMaterial::getEmissiveValueName |
( |
|
) |
[inline, static] |
|
std::string NL3D::CAnimatedMaterial::getMaterialName |
( |
|
) |
const |
|
const char* NL3D::CAnimatedMaterial::getOpacityValueName |
( |
|
) |
[inline, static] |
|
const char* NL3D::CAnimatedMaterial::getShininessValueName |
( |
|
) |
[inline, static] |
|
const char* NL3D::CAnimatedMaterial::getSpecularValueName |
( |
|
) |
[inline, static] |
|
const char * NL3D::CAnimatedMaterial::getTexMatUScaleName |
( |
uint |
stage |
) |
[static] |
|
const char * NL3D::CAnimatedMaterial::getTexMatUTransName |
( |
uint |
stage |
) |
[static] |
|
const char * NL3D::CAnimatedMaterial::getTexMatVScaleName |
( |
uint |
stage |
) |
[static] |
|
const char * NL3D::CAnimatedMaterial::getTexMatVTransName |
( |
uint |
stage |
) |
[static] |
|
const char * NL3D::CAnimatedMaterial::getTexMatWRotName |
( |
uint |
stage |
) |
[static] |
|
const char* NL3D::CAnimatedMaterial::getTextureValueName |
( |
|
) |
[inline, static] |
|
|
From IAnimatable.
Implements NL3D::IAnimatable.
Definition at line 282 of file animated_material.cpp.
References _Ambient, _Diffuse, _Emissive, _Opacity, _Shininess, _Specular, _TexAnimatedMatValues, _Texture, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::_UScale, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::_UTrans, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::_VScale, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::_VTrans, NL3D::CAnimatedMaterial::CTexAnimatedMatValues::_WRot, AmbientValue, AnimValueLast, DiffuseValue, EmissiveValue, nlstop, NumTexAnimatedValues, OpacityValue, ShininessValue, SpecularValue, TextureMatValues, and TextureValue. |
const char * NL3D::CAnimatedMaterial::getValueName |
( |
uint |
valueId |
) |
const [virtual] |
|
|
From IAnimatable.
Implements NL3D::IAnimatable.
Definition at line 316 of file animated_material.cpp.
References AmbientValue, AnimValueLast, DiffuseValue, EmissiveValue, getAmbientValueName, getDiffuseValueName, getEmissiveValueName, getOpacityValueName, getShininessValueName, getSpecularValueName, getTexMatUScaleName, getTexMatUTransName, getTexMatVScaleName, getTexMatVTransName, getTexMatWRotName, getTextureValueName, nlstop, NumTexAnimatedValues, OpacityValue, ShininessValue, SpecularValue, TextureMatValues, and TextureValue. |
void NL3D::CAnimatedMaterial::registerToChannelMixer |
( |
CChannelMixer * |
chanMixer, |
|
|
const std::string & |
prefix |
|
) |
[virtual] |
|
|
From IAnimatable.
Implements NL3D::IAnimatable.
Definition at line 386 of file animated_material.cpp.
References NL3D::IAnimatable::addValue, AmbientValue, DiffuseValue, EmissiveValue, NL3D::IDRV_MAT_MAXTEXTURES, NLAISCRIPT::l, NumTexAnimatedValues, OpacityValue, OwnerBit, ShininessValue, SpecularValue, TextureMatValues, and TextureValue. |
void NL3D::CAnimatedMaterial::setMaterial |
( |
CMaterial * |
pMat |
) |
|
|
|
setup the material context for this animated material.
This method:
- store a RefPtr on the material, for future anim update.
Definition at line 182 of file animated_material.cpp.
References _Material. |
void NL3D::CAnimatedMaterial::update |
( |
|
) |
|
|
|
Check if The animated material is touched, and if necessary update the stored material (if any).
Texture animation: for now, texture animation is possible only on stage 0. If TextureValue flag is touched (ie a texture anim track is linked to the animated value), update() look into the CMaterialBase what texture to set. If the track gives a bad Id for the texture, no-op.
Definition at line 197 of file animated_material.cpp.
References _Ambient, _Diffuse, _Emissive, _Material, _MaterialBase, _Opacity, _Shininess, _Specular, _TexAnimatedMatValues, _Texture, AmbientValue, NLMISC::clamp, NL3D::IAnimatable::clearFlag, DiffuseValue, EmissiveValue, id, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::IAnimatable::isTouched, NLMISC::CVector::K, NLAISCRIPT::l, nlassert, NumTexAnimatedValues, OpacityValue, OwnerBit, ShininessValue, SpecularValue, t, TextureMatValues, and TextureValue. |
Member Data Documentation
CRefPtr<CMaterial> NL3D::CAnimatedMaterial::_Material [private]
|
|
CRefPtr<CMaterialBase> NL3D::CAnimatedMaterial::_MaterialBase [private]
|
|
The documentation for this class was generated from the following files:
|
|