From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1CMeshBase.html | 1529 ++++++++++++++++++++++++++ 1 file changed, 1529 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1CMeshBase.html (limited to 'docs/doxygen/nel/classNL3D_1_1CMeshBase.html') diff --git a/docs/doxygen/nel/classNL3D_1_1CMeshBase.html b/docs/doxygen/nel/classNL3D_1_1CMeshBase.html new file mode 100644 index 00000000..d04bf6d2 --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1CMeshBase.html @@ -0,0 +1,1529 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::CMeshBase Class Reference

A base mesh with just material manipulation. +More... +

+#include <mesh_base.h> +

+

Inheritance diagram for NL3D::CMeshBase: +

+ +NL3D::IShape +NLMISC::CRefCount +NLMISC::IStreamable +NLMISC::IClassable +NL3D::CMesh +NL3D::CMeshMRM +NL3D::CMeshMultiLod + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

Structures for building a mesh.
typedef std::map< std::string,
+ CLightInfoMapList
TLightInfoMap

Public Methods

 CMeshBase ()
 Constructor. More...

 ~CMeshBase ()
void serialMeshBase (NLMISC::IStream &f) throw (NLMISC::EStream)
 serial the base Part of this mesh. More...

void flushTextures (IDriver &driver)
 Flush textures. More...

bool isLightable () const
 Is this mesh lightable? true if one of his materials is not a lightmap. NB: result stored in file. More...

virtual bool useLightingLocalAttenuation () const
 tells if the shape wants LocalAttenuation for RealTime lighting. Default is false. More...

animated material mgt. do it after CMesh::build(), or CMeshMRM::build()
void setAnimatedMaterial (uint id, const std::string &matName)
 setup a material as animated. Material must exist or else no-op. More...

CMaterialBasegetAnimatedMaterial (uint id)
 return NULL if this material is NOT animated. (or if material do not exist). More...

access default tracks.
CTrackDefaultVectorgetDefaultPos ()
CTrackDefaultVectorgetDefaultPivot ()
CTrackDefaultVectorgetDefaultRotEuler ()
CTrackDefaultQuatgetDefaultRotQuat ()
CTrackDefaultVectorgetDefaultScale ()
CTrackDefaultRGBAgetDefaultLMFactor ()
Material accessors
uint getNbMaterial () const
 Get the number of materials in the mesh. More...

CMaterialgetMaterial (uint id)
 Get a material. More...

const CMaterialgetMaterial (uint id) const
 Get a material, const version. More...

Automatic animation
void setAutoAnim (bool on=true)
 Tells that the model instanciated from this shape should be automatically animated. More...

bool getAutoAnim () const
LodCharacterTexture
void resetLodCharacterTexture ()
 reset the lod texture info. see CSkeletonModel Lod system. More...

void setupLodCharacterTexture (CLodCharacterTexture &lodText)
 setup the lod texture info. see CSkeletonModel Lod system. More...

const CLodCharacterTexturegetLodCharacterTexture () const
 get the lod texture info. see CSkeletonModel Lod system. NULL per default. NB: serialised. More...


Public Attributes

TLightInfoMap _LightInfos

Protected Types

typedef std::map< uint32,
+ CMaterialBase
TAnimatedMaterialMap
 Animated Material mgt. More...


Protected Methods

void buildMeshBase (CMeshBaseBuild &m)
 Just copy informations from a CMeshBaseBuild. More...

void instanciateMeshBase (CMeshBaseInstance *mi, CScene *ownerScene)
 instanciate MeshBase part to an instance (a CMeshBaseInstance). More...

void applyMaterialUsageOptim (const std::vector< bool > &materialUsed, std::vector< sint > &remap)
 delete any material not used, and build remap table (old to new). More...


Protected Attributes

std::vector< CMaterial_Materials
 The Materials. More...

TAnimatedMaterialMap _AnimatedMaterials
CTrackDefaultVector _DefaultPos
 Transform default tracks. Those default tracks are instancied, ie, CInstanceMesh will have the same and can't specialize it. More...

CTrackDefaultVector _DefaultPivot
CTrackDefaultVector _DefaultRotEuler
CTrackDefaultQuat _DefaultRotQuat
CTrackDefaultVector _DefaultScale
CTrackDefaultRGBA _DefaultLMFactor
std::vector< CMorphBase_AnimatedMorph
bool _IsLightable
 Is this mesh lightable?? More...

bool _UseLightingLocalAttenuation
 Is this mesh Use Lighting Local Attenuation ?? More...

bool _AutoAnim

Private Methods

void computeIsLightable ()
 compute _Lightable. More...


Private Attributes

CLodCharacterTexture_LodCharacterTexture
 The Texture Lod info for this mesh. NB: NULL by default. More...

+

Detailed Description

+A base mesh with just material manipulation. +

+Used as an abstract base class for CMesh or CMeshMRM.

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2001
+

+ +

+Definition at line 53 of file mesh_base.h.


Member Typedef Documentation

+

+ + + + +
+ + +
typedef std::map<uint32, CMaterialBase> NL3D::CMeshBase::TAnimatedMaterialMap [protected] +
+
+ + + + + +
+   + + +

+Animated Material mgt. +

+ +

+Definition at line 204 of file mesh_base.h.

+

+ + + + +
+ + +
typedef std::map< std::string, CLightInfoMapList > NL3D::CMeshBase::TLightInfoMap +
+
+ + + + + +
+   + + +

+ +

+Definition at line 76 of file mesh_base.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CMeshBase::CMeshBase  
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 43 of file mesh_base.cpp. +

+References _AutoAnim, _DefaultLMFactor, _DefaultPivot, _DefaultPos, _DefaultRotEuler, _DefaultRotQuat, _DefaultScale, _LodCharacterTexture, and _UseLightingLocalAttenuation. +

+Referenced by NL3D::CMesh::operator=.

+

+ + + + +
+ + + + + + + + + +
NL3D::CMeshBase::~CMeshBase  
+
+ + + + + +
+   + + +

+ +

+Definition at line 62 of file mesh_base.cpp. +

+References resetLodCharacterTexture.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBase::applyMaterialUsageOptim const std::vector< bool > &   materialUsed,
std::vector< sint > &   remap
[protected]
+
+ + + + + +
+   + + +

+delete any material not used, and build remap table (old to new). +

+_AnimatedMaterials are reseted resetLodCharacterTexture(); is called +

+Definition at line 328 of file mesh_base.cpp. +

+References _AnimatedMaterials, _LightInfos, _Materials, nlassert, and resetLodCharacterTexture.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBase::buildMeshBase CMeshBaseBuild  m [protected]
+
+ + + + + +
+   + + +

+Just copy informations from a CMeshBaseBuild. +

+ +

+Definition at line 217 of file mesh_base.cpp. +

+References _AnimatedMaterials, _AnimatedMorph, _DefaultPivot, _DefaultPos, _DefaultRotEuler, _DefaultRotQuat, _DefaultScale, _LightInfos, _Materials, _UseLightingLocalAttenuation, and computeIsLightable.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshBase::computeIsLightable   [private]
+
+ + + + + +
+   + + +

+compute _Lightable. +

+ +

+Definition at line 400 of file mesh_base.cpp. +

+References _IsLightable, and _Materials. +

+Referenced by buildMeshBase, and serialMeshBase.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBase::flushTextures IDriver  driver [virtual]
+
+ + + + + +
+   + + +

+Flush textures. +

+ +

+Implements NL3D::IShape. +

+Definition at line 385 of file mesh_base.cpp. +

+References _Materials.

+

+ + + + +
+ + + + + + + + + + +
CMaterialBase * NL3D::CMeshBase::getAnimatedMaterial uint   id
+
+ + + + + +
+   + + +

+return NULL if this material is NOT animated. (or if material do not exist). +

+ +

+Definition at line 90 of file mesh_base.cpp. +

+References _AnimatedMaterials, and id.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBase::getAutoAnim   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 177 of file mesh_base.h. +

+References _AutoAnim.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultRGBA* NL3D::CMeshBase::getDefaultLMFactor   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 131 of file mesh_base.h. +

+References _DefaultLMFactor.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CMeshBase::getDefaultPivot   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 127 of file mesh_base.h. +

+References _DefaultPivot.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CMeshBase::getDefaultPos   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 126 of file mesh_base.h. +

+References _DefaultPos.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CMeshBase::getDefaultRotEuler   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 128 of file mesh_base.h. +

+References _DefaultRotEuler.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultQuat* NL3D::CMeshBase::getDefaultRotQuat   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 129 of file mesh_base.h. +

+References _DefaultRotQuat.

+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CMeshBase::getDefaultScale   [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 130 of file mesh_base.h. +

+References _DefaultScale.

+

+ + + + +
+ + + + + + + + + +
const CLodCharacterTexture* NL3D::CMeshBase::getLodCharacterTexture   const [inline]
+
+ + + + + +
+   + + +

+get the lod texture info. see CSkeletonModel Lod system. NULL per default. NB: serialised. +

+ +

+Definition at line 188 of file mesh_base.h.

+

+ + + + +
+ + + + + + + + + + +
const CMaterial& NL3D::CMeshBase::getMaterial uint   id const [inline]
+
+ + + + + +
+   + + +

+Get a material, const version. +

+ +

+Definition at line 149 of file mesh_base.h. +

+References _Materials, and id.

+

+ + + + +
+ + + + + + + + + + +
CMaterial& NL3D::CMeshBase::getMaterial uint   id [inline]
+
+ + + + + +
+   + + +

+Get a material. +

+ +

+Definition at line 144 of file mesh_base.h. +

+References _Materials, and id.

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CMeshBase::getNbMaterial   const [inline]
+
+ + + + + +
+   + + +

+Get the number of materials in the mesh. +

+ +

+Definition at line 138 of file mesh_base.h. +

+References _Materials.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBase::instanciateMeshBase CMeshBaseInstance  mi,
CScene  ownerScene
[protected]
+
+ + + + + +
+   + + +

+instanciate MeshBase part to an instance (a CMeshBaseInstance). +

+ +

+Definition at line 252 of file mesh_base.cpp. +

+References _AnimatedMaterials, _AnimatedMorph, _DefaultPivot, _DefaultPos, _DefaultRotQuat, _DefaultScale, _Materials, NL3D::CAnimatedValueQuat, NL3D::CAnimatedValueVector, and nlassert.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBase::isLightable   const [inline]
+
+ + + + + +
+   + + +

+Is this mesh lightable? true if one of his materials is not a lightmap. NB: result stored in file. +

+ +

+Definition at line 163 of file mesh_base.h. +

+References _IsLightable.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CMeshBase::resetLodCharacterTexture  
+
+ + + + + +
+   + + +

+reset the lod texture info. see CSkeletonModel Lod system. +

+ +

+Definition at line 429 of file mesh_base.cpp. +

+References _LodCharacterTexture. +

+Referenced by applyMaterialUsageOptim, setupLodCharacterTexture, and ~CMeshBase.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBase::serialMeshBase NLMISC::IStream  f throw (NLMISC::EStream)
+
+ + + + + +
+   + + +

+serial the base Part of this mesh. +

+ +

+Definition at line 149 of file mesh_base.cpp. +

+References _AnimatedMaterials, _AnimatedMorph, _AutoAnim, _DefaultPivot, _DefaultPos, _DefaultRotEuler, _DefaultRotQuat, _DefaultScale, NL3D::IShape::_DistMax, _IsLightable, _LightInfos, _LodCharacterTexture, _Materials, _UseLightingLocalAttenuation, and computeIsLightable.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMeshBase::setAnimatedMaterial uint   id,
const std::string &   matName
+
+ + + + + +
+   + + +

+setup a material as animated. Material must exist or else no-op. +

+ +

+Definition at line 77 of file mesh_base.cpp. +

+References _AnimatedMaterials, _Materials, id, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBase::setAutoAnim bool   on = true [inline]
+
+ + + + + +
+   + + +

+Tells that the model instanciated from this shape should be automatically animated. +

+If so the scene will search for an automatic anim that has the same name than this shape and will bind it. This state is serialized. NB: This is a clue to scene::createInstance, a call to createInstance of this object won't make the animation binding. +

+Definition at line 175 of file mesh_base.h. +

+References _AutoAnim.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMeshBase::setupLodCharacterTexture CLodCharacterTexture  lodText
+
+ + + + + +
+   + + +

+setup the lod texture info. see CSkeletonModel Lod system. +

+ +

+Definition at line 439 of file mesh_base.cpp. +

+References _LodCharacterTexture, and resetLodCharacterTexture.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CMeshBase::useLightingLocalAttenuation   const [virtual]
+
+ + + + + +
+   + + +

+tells if the shape wants LocalAttenuation for RealTime lighting. Default is false. +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 422 of file mesh_base.cpp. +

+References _UseLightingLocalAttenuation.

+


Member Data Documentation

+

+ + + + +
+ + +
TAnimatedMaterialMap NL3D::CMeshBase::_AnimatedMaterials [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 205 of file mesh_base.h. +

+Referenced by applyMaterialUsageOptim, buildMeshBase, getAnimatedMaterial, instanciateMeshBase, serialMeshBase, and setAnimatedMaterial.

+

+ + + + +
+ + +
std::vector<CMorphBase> NL3D::CMeshBase::_AnimatedMorph [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 216 of file mesh_base.h. +

+Referenced by buildMeshBase, instanciateMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
bool NL3D::CMeshBase::_AutoAnim [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 223 of file mesh_base.h. +

+Referenced by CMeshBase, getAutoAnim, serialMeshBase, and setAutoAnim.

+

+ + + + +
+ + +
CTrackDefaultRGBA NL3D::CMeshBase::_DefaultLMFactor [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 214 of file mesh_base.h. +

+Referenced by CMeshBase, and getDefaultLMFactor.

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CMeshBase::_DefaultPivot [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 210 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, getDefaultPivot, instanciateMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CMeshBase::_DefaultPos [protected] +
+
+ + + + + +
+   + + +

+Transform default tracks. Those default tracks are instancied, ie, CInstanceMesh will have the same and can't specialize it. +

+ +

+Definition at line 209 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, getDefaultPos, instanciateMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CMeshBase::_DefaultRotEuler [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 211 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, getDefaultRotEuler, and serialMeshBase.

+

+ + + + +
+ + +
CTrackDefaultQuat NL3D::CMeshBase::_DefaultRotQuat [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 212 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, getDefaultRotQuat, instanciateMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CMeshBase::_DefaultScale [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 213 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, getDefaultScale, instanciateMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
bool NL3D::CMeshBase::_IsLightable [protected] +
+
+ + + + + +
+   + + +

+Is this mesh lightable?? +

+ +

+Definition at line 219 of file mesh_base.h. +

+Referenced by computeIsLightable, isLightable, and serialMeshBase.

+

+ + + + +
+ + +
TLightInfoMap NL3D::CMeshBase::_LightInfos +
+
+ + + + + +
+   + + +

+ +

+Definition at line 199 of file mesh_base.h. +

+Referenced by applyMaterialUsageOptim, buildMeshBase, and serialMeshBase.

+

+ + + + +
+ + +
CLodCharacterTexture* NL3D::CMeshBase::_LodCharacterTexture [private] +
+
+ + + + + +
+   + + +

+The Texture Lod info for this mesh. NB: NULL by default. +

+ +

+Definition at line 243 of file mesh_base.h. +

+Referenced by CMeshBase, resetLodCharacterTexture, serialMeshBase, and setupLodCharacterTexture.

+

+ + + + +
+ + +
std::vector<CMaterial> NL3D::CMeshBase::_Materials [protected] +
+
+ + + + + +
+   + + +

+The Materials. +

+ +

+Definition at line 195 of file mesh_base.h. +

+Referenced by applyMaterialUsageOptim, buildMeshBase, computeIsLightable, flushTextures, getMaterial, getNbMaterial, instanciateMeshBase, serialMeshBase, and setAnimatedMaterial.

+

+ + + + +
+ + +
bool NL3D::CMeshBase::_UseLightingLocalAttenuation [protected] +
+
+ + + + + +
+   + + +

+Is this mesh Use Lighting Local Attenuation ?? +

+ +

+Definition at line 221 of file mesh_base.h. +

+Referenced by buildMeshBase, CMeshBase, serialMeshBase, and useLightingLocalAttenuation.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1