|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMeshBaseInstance Class ReferenceAn base class for instance of CMesh and CMeshMRM (which derive from CMeshBase).
More...
#include <mesh_base_instance.h>
Inheritance diagram for NL3D::CMeshBaseInstance:
List of all members.
IAnimatable Interface (registering only IAnimatable sons). |
enum | TAnimValues { OwnerBit = CTransformShape::AnimValueLast,
AnimValueLast
} |
| Added values. More...
|
virtual void | registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix) |
| register transform channels (in global anim mode). More...
|
Async Texture Loading |
void | releaseCurrentAsyncTextures () |
sint | _AsyncTextureToLoadRefCount |
bool | _AsyncTextureDirty |
bool | _AsyncTextureMode |
bool | _AsyncTextureReady |
std::vector< CAsyncTextureBlock > | _CurrentAsyncTextures |
float | _AsyncTextureDistance |
class | CAsyncTextureManager |
| 0 if all the texture are async loaded. Setup by the CAsyncTextureManager. More...
|
Public Types |
Public Methods |
void | setAnimatedLightmap (CAnimatedLightmap *alm) |
CScene * | getScene () const |
| Get the scene which owns this instance. More...
|
virtual void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Change MRM Distance setup. More...
|
void | selectTextureSet (uint id) |
| temp: eval non detail animation The issue here is that this evaluation is performed after clipping. More...
|
|
virtual uint | getNumMaterial () const |
| Get the count of material in this transform shape. More...
|
virtual const CMaterial * | getMaterial (uint materialId) const |
| Get a material of the transform shape. More...
|
virtual CMaterial * | getMaterial (uint materialId) |
| Get a material of the transform shape. More...
|
|
virtual ITrack * | getDefaultTrack (uint valueId) |
| Default Track Values. More...
|
|
uint32 | getNbLightMap () |
void | getLightMapName (uint32 nLightMapNb, std::string &LightMapName) |
void | setLightMapFactor (const std::string &LightMapName, CRGBA nFactor) |
|
uint32 | getNbBlendShape () |
void | getBlendShapeName (uint32 nBlendShapeNb, std::string &BlendShapeName) |
void | setBlendShapeFactor (const std::string &BlendShapeName, float rFactor) |
std::vector< CAnimatedMorph > * | getBlendShapeFactors () |
|
void | enableAsyncTextureMode (bool enable) |
| if true, the instance is said in "AsyncTextureMode". More...
|
bool | getAsyncTextureMode () const |
void | startAsyncTextureLoading () |
| Start to load all textures in AsyncTextures array (if needed) NB: old setup is kept in Material => instance is still rendered with "coherent" textures, until new textures are ready no op if not in async texture mode. More...
|
bool | isAsyncTextureReady () |
| return true if all the async textures of the instances are uploaded. More...
|
void | setAsyncTextureDistance (float dist) |
| For Lod of texture, and load balancing, set the approximate distance of the instance to the camera. More...
|
float | getAsyncTextureDistance () const |
void | setAsyncTextureDirty (bool flag) |
| User is free to flag this state, to know if startAsyncTextureLoading() should be called. More...
|
bool | isAsyncTextureDirty () const |
| see dirtAsyncTextureState(). More...
|
sint | getAsyncTextureId (uint matId, uint stage) const |
| Get an AynscTextureId. More...
|
Static Public Methods |
void | registerBasic () |
| Call at the begining of the program, to register the model, and the basic observers. More...
|
Public Attributes |
std::vector< CMaterial > | Materials |
| The list of materials, copied from the mesh. More...
|
std::vector< CAsyncTextureBlock > | AsyncTextures |
| For Aynsc Texture Loading. More...
|
float | _VPWindTreePhase |
| CMeshVPWindTree instance specific part. More...
|
Protected Methods |
| CMeshBaseInstance () |
| Constructor. More...
|
virtual | ~CMeshBaseInstance () |
| Destructor. More...
|
Static Private Methods |
IModel * | creator () |
Private Attributes |
std::vector< CAnimatedMaterial > | _AnimatedMaterials |
| The list of animated materials, instanciated from the mesh. More...
|
std::vector< CAnimatedLightmap * > | _AnimatedLightmap |
std::vector< CAnimatedMorph > | _AnimatedMorphFactor |
CScene * | _OwnerScene |
| The Scene where the instance is created. More...
|
Friends |
class | CMeshBase |
class | CMeshBaseInstanceAnimDetailObs |
Detailed Description
An base class for instance of CMesh and CMeshMRM (which derive from CMeshBase).
NB: this class is a model but is not designed to be instanciated in CMOT. NB: no observers are needed, but AnimDetailObs, since same functionality as CTransformShape. -
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 64 of file mesh_base_instance.h.
Member Enumeration Documentation
enum NL3D::CMeshBaseInstance::TAnimValues
|
|
Constructor & Destructor Documentation
NL3D::CMeshBaseInstance::CMeshBaseInstance |
( |
|
) |
[protected] |
|
NL3D::CMeshBaseInstance::~CMeshBaseInstance |
( |
|
) |
[protected, virtual] |
|
Member Function Documentation
virtual void NL3D::CMeshBaseInstance::changeMRMDistanceSetup |
( |
float |
distanceFinest, |
|
|
float |
distanceMiddle, |
|
|
float |
distanceCoarsest |
|
) |
[inline, virtual] |
|
|
Change MRM Distance setup.
Only for mesh which support MRM. NB MeshMultiLod apply it only on Lod0. NB: This apply to the shape direclty!! ie All instances using same shape will be affected NB: no-op if distanceFinest<0, distanceMiddle<=distanceFinest or if distanceCoarsest<=distanceMiddle. -
Parameters:
-
distanceFinest |
The MRM has its max faces when dist<=distanceFinest. |
distanceMiddle |
The MRM has 50% of its faces at dist==distanceMiddle. |
distanceCoarsest |
The MRM has faces/Divisor (ie near 0) when dist>=distanceCoarsest. |
Reimplemented in NL3D::CMeshMRMInstance.
Definition at line 150 of file mesh_base_instance.h. |
IModel* NL3D::CMeshBaseInstance::creator |
( |
|
) |
[inline, static, private] |
|
void NL3D::CMeshBaseInstance::enableAsyncTextureMode |
( |
bool |
enable |
) |
|
|
|
if true, the instance is said in "AsyncTextureMode".
Ie user must fill AsyncTextures field with name of the textures to load. At each startAsyncTextureLoading(), the system start to load async them. Then, isAsyncTextureReady() should be test each frame, to know if loading has completed. By default, AsyncTextureMode=false. When it swap from false to true, each texture file in Materials are replaced with "blank.tga", and true fileNames are copied into AsyncTextures. When it swap from true to false, the inverse is applied. NB: calling enableAsyncTextureMode(true) calls setAsyncTextureDirty(true)
Definition at line 341 of file mesh_base_instance.cpp.
References _AsyncTextureMode, _AsyncTextureReady, _AsyncTextureToLoadRefCount, _CurrentAsyncTextures, AsyncTextures, NLMISC::contReset, NL3D::IDRV_MAT_MAXTEXTURES, Materials, nlassert, releaseCurrentAsyncTextures, and setAsyncTextureDirty.
Referenced by ~CMeshBaseInstance. |
float NL3D::CMeshBaseInstance::getAsyncTextureDistance |
( |
|
) |
const [inline] |
|
sint NL3D::CMeshBaseInstance::getAsyncTextureId |
( |
uint |
matId, |
|
|
uint |
stage |
|
) |
const |
|
|
Get an AynscTextureId.
ret -1 if not found, or not a textureFile. NB: the id returned is the one in _CurrentAsyncTexture it the valid ones (thoses loaded or being loaded) Can be used for some (non deleting) request to the AsyncTextureManager
Definition at line 513 of file mesh_base_instance.cpp.
References _CurrentAsyncTextures. |
bool NL3D::CMeshBaseInstance::getAsyncTextureMode |
( |
|
) |
const [inline] |
|
std::vector<CAnimatedMorph>* NL3D::CMeshBaseInstance::getBlendShapeFactors |
( |
|
) |
[inline] |
|
void NL3D::CMeshBaseInstance::getBlendShapeName |
( |
uint32 |
nBlendShapeNb, |
|
|
std::string & |
BlendShapeName |
|
) |
|
|
ITrack * NL3D::CMeshBaseInstance::getDefaultTrack |
( |
uint |
valueId |
) |
[virtual] |
|
void NL3D::CMeshBaseInstance::getLightMapName |
( |
uint32 |
nLightMapNb, |
|
|
std::string & |
LightMapName |
|
) |
|
|
CMaterial * NL3D::CMeshBaseInstance::getMaterial |
( |
uint |
materialId |
) |
[virtual] |
|
const CMaterial * NL3D::CMeshBaseInstance::getMaterial |
( |
uint |
materialId |
) |
const [virtual] |
|
uint32 NL3D::CMeshBaseInstance::getNbBlendShape |
( |
|
) |
|
|
uint32 NL3D::CMeshBaseInstance::getNbLightMap |
( |
|
) |
|
|
uint NL3D::CMeshBaseInstance::getNumMaterial |
( |
|
) |
const [virtual] |
|
CScene* NL3D::CMeshBaseInstance::getScene |
( |
|
) |
const [inline] |
|
bool NL3D::CMeshBaseInstance::isAsyncTextureDirty |
( |
|
) |
const [inline] |
|
bool NL3D::CMeshBaseInstance::isAsyncTextureReady |
( |
|
) |
|
|
void NL3D::CMeshBaseInstance::registerBasic |
( |
|
) |
[static] |
|
void NL3D::CMeshBaseInstance::registerToChannelMixer |
( |
CChannelMixer * |
chanMixer, |
|
|
const std::string & |
prefix |
|
) |
[virtual] |
|
void NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures |
( |
|
) |
[private] |
|
void NL3D::CMeshBaseInstance::selectTextureSet |
( |
uint |
id |
) |
|
|
|
temp: eval non detail animation The issue here is that this evaluation is performed after clipping.
This means that rotation will be ok, but translation may not work
Definition at line 256 of file mesh_base_instance.cpp.
References _AsyncTextureMode, AsyncTextures, CMeshBase, id, NL3D::IDRV_MAT_MAXTEXTURES, NLAISCRIPT::l, Materials, nlassert, setAsyncTextureDirty, and NL3D::CTransformShape::Shape. |
void NL3D::CMeshBaseInstance::setAsyncTextureDirty |
( |
bool |
flag |
) |
[inline] |
|
void NL3D::CMeshBaseInstance::setAsyncTextureDistance |
( |
float |
dist |
) |
[inline] |
|
void NL3D::CMeshBaseInstance::setBlendShapeFactor |
( |
const std::string & |
BlendShapeName, |
|
|
float |
rFactor |
|
) |
|
|
void NL3D::CMeshBaseInstance::setLightMapFactor |
( |
const std::string & |
LightMapName, |
|
|
CRGBA |
nFactor |
|
) |
|
|
void NL3D::CMeshBaseInstance::startAsyncTextureLoading |
( |
|
) |
|
|
Friends And Related Function Documentation
friend class CAsyncTextureManager [friend]
|
|
friend class CMeshBase [friend]
|
|
friend class CMeshBaseInstanceAnimDetailObs [friend]
|
|
Member Data Documentation
std::vector<CAnimatedMorph> NL3D::CMeshBaseInstance::_AnimatedMorphFactor [private]
|
|
bool NL3D::CMeshBaseInstance::_AsyncTextureDirty [private]
|
|
float NL3D::CMeshBaseInstance::_AsyncTextureDistance [private]
|
|
bool NL3D::CMeshBaseInstance::_AsyncTextureMode [private]
|
|
bool NL3D::CMeshBaseInstance::_AsyncTextureReady [private]
|
|
sint NL3D::CMeshBaseInstance::_AsyncTextureToLoadRefCount [private]
|
|
CScene* NL3D::CMeshBaseInstance::_OwnerScene [private]
|
|
float NL3D::CMeshBaseInstance::_VPWindTreePhase
|
|
std::vector<CMaterial> NL3D::CMeshBaseInstance::Materials
|
|
The documentation for this class was generated from the following files:
|
|