|
|
LibN2L-4 Library Code Reference
Classes
Compounds
Files
Members
Method Index
Full Reference
n2l::cRVisualTriMesh Class Reference#include <cRVisualTriMesh.h>
Collaboration diagram for n2l::cRVisualTriMesh:
[legend]List of all members.Public Types
Public Member Functions
- cRVisualTriMesh ()
- cRVisualTriMesh (const cRVisualTriMesh &iMesh)
- cRVisualTriMesh (const cVfsNodeInterface &iNode)
- cRVisualTriMesh (const cDynVar &iDef)
- ~cRVisualTriMesh ()
- void load (const cVfsNodeInterface &iNode)
- Load a N2L Visual TriMesh definition from the provided vfs node, and load it with the appropriat method.
- void load (const cDynVar &iDef)
- Load the N2L Visual TriMesh definition in the provided dynvariable.
- void render (const cAutoPtr< const cGLTexture > &i_iTexture, const tRenderOptions iOptions) const
- Render the mesh The texture may be set to 0 to use the textures defined within the mesh's materials (if defined).
- void render (const cGLTexture &iTexture) const
- Render the mesh.
- void clear ()
- Completely empty the mesh.
- cRVisualTriMesh & operator= (const cRVisualTriMesh &iMesh)
- Assignment.
- cMaterial & material (const tString &iMaterialName)
- cMaterial & material (const tUint &iIndex)
- void selectVertexListByMaterial (std::list< tVector3f > &oList, const tString &iMaterialName) const
- Request a vertex list from the model by material type.
- void selectFaceIndexListByName (std::list< tUint > &oList, const tString &iName) const
- Request a list of indices into the face array by the name assigned to them.
- void selectVertexListByName (std::list< tVector3f > &oList, const tString &iName) const
- Request a vertex list from the model by 'name' property.
- void selectVertexListByContainer (std::list< tVector3f > &oList, const tString &iName) const
- void selectVertexIndexListByName (std::list< tUint > &oList, const tString &iName) const
- void selectVertexIndexListByContainer (std::list< tUint > &oList, const tString &iName) const
- void selectVertexIndexListByAnyName (std::list< tUint > &oList, const tString &iName, const tString &iPrefx="__") const
- Returns the merger of all vertex indicies that are in an object that matches iName, a container that matches iName, or a container that matches '__'.iName.
- void selectVertexListByAnyName (std::list< tVector3f > &oList, const tString &iName, const tString &iPrefx="__") const
- const tConstVertexIterator vertexBegin () const
- const tConstVertexIterator vertexEnd () const
- const tConstFaceIterator faceBegin () const
- const tConstFaceIterator faceEnd () const
- const tVertexIterator vertexBegin ()
- const tVertexIterator vertexEnd ()
- const tVector3f & vertex (const tUint iIndex) const
- const tVector3f & normal (const tUint iIndex) const
- const cRTriMeshFace & face (const tUint iIndex) const
- const tString & name (const tUint iIndex) const
- const tUint numVertices () const
- const tUint numFaces () const
- const tUint numNames () const
- const tVector3f dimensions () const
- Get the dimensions of the current mesh.
- const tFloat boundingRadius () const
- Calculate the radius of the smallest sphere necessary to entirely encompass the geometry.
- const tFloat scaledBoundingRadius (const tVector3f &iScale) const
- Does the same as boundingRadius, but applies the scaling vector.
- void scale (const tVector3f &iScale)
- Scale the model by this vector.
Classes
Detailed Description
Definition at line 44 of file cRVisualTriMesh.h.
Member Typedef Documentation
Constructor & Destructor Documentation
| n2l::cRVisualTriMesh::cRVisualTriMesh |
( |
|
) |
|
|
| n2l::cRVisualTriMesh::cRVisualTriMesh |
( |
const cDynVar & |
iDef |
) |
|
|
| n2l::cRVisualTriMesh::~cRVisualTriMesh |
( |
|
) |
|
|
Member Function Documentation
| const tFloat n2l::cRVisualTriMesh::boundingRadius |
( |
|
) |
const |
|
|
|
Calculate the radius of the smallest sphere necessary to entirely encompass the geometry.
- Warning:
- There's almost certainly a better way to do this, and the current implementation is terribly slow. Best to cache this radius, otherwise you'll gain nothing from culling because the sphere will take so long to calculate :)
Definition at line 581 of file cRVisualTriMesh.cpp.
References n2l::n2lMax(). |
| void n2l::cRVisualTriMesh::clear |
( |
|
) |
|
|
| const tVector3f n2l::cRVisualTriMesh::dimensions |
( |
|
) |
const |
|
|
|
Get the dimensions of the current mesh.
- Note:
- The n2l mesh compiler normalizes the model so that the longest dimension is 1.
Definition at line 562 of file cRVisualTriMesh.cpp.
References n2l::n2lMax(), n2l::n2lMin(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::set(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::x(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::y(), and n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::z(). |
| void n2l::cRVisualTriMesh::load |
( |
const cDynVar & |
iDef |
) |
|
|
|
|
Load the N2L Visual TriMesh definition in the provided dynvariable.
Definition at line 92 of file cRVisualTriMesh.cpp. |
| const tString& n2l::cRVisualTriMesh::name |
( |
const tUint |
iIndex |
) |
const [inline] |
|
| const tVector3f& n2l::cRVisualTriMesh::normal |
( |
const tUint |
iIndex |
) |
const [inline] |
|
| const tUint n2l::cRVisualTriMesh::numFaces |
( |
|
) |
const [inline] |
|
| const tUint n2l::cRVisualTriMesh::numNames |
( |
|
) |
const [inline] |
|
| const tUint n2l::cRVisualTriMesh::numVertices |
( |
|
) |
const [inline] |
|
| void n2l::cRVisualTriMesh::render |
( |
const cGLTexture & |
iTexture |
) |
const |
|
|
|
Render the mesh.
- Note:
- This render is identical to the render() above, except it is optimized for 'R_Normal' rendering, and assumes that the texture is set AND enabled.
Definition at line 279 of file cRVisualTriMesh.cpp.
References n2l::cGLTexture::bind(), face(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::glNormal3f(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::glTexCoord2f(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::glVertex3f(), n2l::MatOpt_Normal, n2l::cRVisualTriMesh::cRTriMeshFace::mFlags, n2l::cRVisualTriMesh::cRTriMeshFace::mMat, n2l::cRVisualTriMesh::cRTriMeshFace::mNA, n2l::cRVisualTriMesh::cRTriMeshFace::mNB, n2l::cRVisualTriMesh::cRTriMeshFace::mNC, n2l::cRVisualTriMesh::cRTriMeshFace::mUVA, n2l::cRVisualTriMesh::cRTriMeshFace::mUVB, n2l::cRVisualTriMesh::cRTriMeshFace::mUVC, n2l::cRVisualTriMesh::cRTriMeshFace::mVA, n2l::cRVisualTriMesh::cRTriMeshFace::mVB, n2l::cRVisualTriMesh::cRTriMeshFace::mVC, and n2l::cMaterial::useMaterial(). |
|
|
Render the mesh The texture may be set to 0 to use the textures defined within the mesh's materials (if defined).
If provided, the skin will override any internal textures.
Definition at line 106 of file cRVisualTriMesh.cpp.
References face(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::glNormal3f(), n2l::cVector2< TComponent, TComponentDiff, TMagnitude >::glTexCoord2f(), n2l::cVector3< TComponent, TComponentDiff, TMagnitude >::glVertex3f(), n2l::cAutoPtr< TPtr >::isSet(), n2l::MatOpt_Normal, n2l::MatOpt_NoTextures, n2l::MatOpt_ZeroDiffAmbEmis, n2l::MatOpt_ZeroSpecular, n2l::cRVisualTriMesh::cRTriMeshFace::mFlags, n2l::cRVisualTriMesh::cRTriMeshFace::mMat, n2l::cRVisualTriMesh::cRTriMeshFace::mNA, n2l::cRVisualTriMesh::cRTriMeshFace::mNB, n2l::cRVisualTriMesh::cRTriMeshFace::mNC, n2l::cRVisualTriMesh::cRTriMeshFace::mUVA, n2l::cRVisualTriMesh::cRTriMeshFace::mUVB, n2l::cRVisualTriMesh::cRTriMeshFace::mUVC, n2l::cRVisualTriMesh::cRTriMeshFace::mVA, n2l::cRVisualTriMesh::cRTriMeshFace::mVB, n2l::cRVisualTriMesh::cRTriMeshFace::mVC, n2l::R_FaceLighting, n2l::R_MultiPass, n2l::R_NoMaterials, n2l::R_NoNormals, n2l::R_NoTextures, n2l::R_ShowNormals, n2l::R_TwoSided, n2l::R_Wireframe, and n2l::cMaterial::useMaterial(). |
| void n2l::cRVisualTriMesh::scale |
( |
const tVector3f & |
iScale |
) |
|
|
| const tFloat n2l::cRVisualTriMesh::scaledBoundingRadius |
( |
const tVector3f & |
iScale |
) |
const |
|
|
|
Does the same as boundingRadius, but applies the scaling vector.
This allows for the calculation of a bounding radius when the final model will always be scaled by a certain amount.
Definition at line 590 of file cRVisualTriMesh.cpp.
References n2l::n2lMax(). |
| void n2l::cRVisualTriMesh::selectFaceIndexListByName |
( |
std::list< tUint > & |
oList, |
|
|
const tString & |
iName |
|
) |
const |
|
|
|
Request a list of indices into the face array by the name assigned to them.
|
| void n2l::cRVisualTriMesh::selectVertexIndexListByAnyName |
( |
std::list< tUint > & |
oList, |
|
|
const tString & |
iName, |
|
|
const tString & |
iPrefx = "__" |
|
) |
const |
|
|
|
Returns the merger of all vertex indicies that are in an object that matches iName, a container that matches iName, or a container that matches '__'.iName.
- Warning:
- Vertices which appear twice in the patterns mentioned will be added twice, no duplication detection is done.
|
| void n2l::cRVisualTriMesh::selectVertexIndexListByContainer |
( |
std::list< tUint > & |
oList, |
|
|
const tString & |
iName |
|
) |
const |
|
| void n2l::cRVisualTriMesh::selectVertexIndexListByName |
( |
std::list< tUint > & |
oList, |
|
|
const tString & |
iName |
|
) |
const |
|
| void n2l::cRVisualTriMesh::selectVertexListByAnyName |
( |
std::list< tVector3f > & |
oList, |
|
|
const tString & |
iName, |
|
|
const tString & |
iPrefx = "__" |
|
) |
const |
|
| void n2l::cRVisualTriMesh::selectVertexListByContainer |
( |
std::list< tVector3f > & |
oList, |
|
|
const tString & |
iName |
|
) |
const |
|
| void n2l::cRVisualTriMesh::selectVertexListByMaterial |
( |
std::list< tVector3f > & |
oList, |
|
|
const tString & |
iMaterialName |
|
) |
const |
|
|
|
Request a vertex list from the model by material type.
|
| void n2l::cRVisualTriMesh::selectVertexListByName |
( |
std::list< tVector3f > & |
oList, |
|
|
const tString & |
iName |
|
) |
const |
|
|
|
Request a vertex list from the model by 'name' property.
|
| const tVector3f& n2l::cRVisualTriMesh::vertex |
( |
const tUint |
iIndex |
) |
const [inline] |
|
The documentation for this class was generated from the following files:
|