AaronCameron.net
What's your point?
Not a Member? - Login or Create an Account...MC Offline
Wednesday the 19th of June 2013 @ 12:41am
Front Page Projects Your Profile About
[]

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:

Collaboration graph
[legend]
List of all members.

Public Types

Public Member Functions

Classes


Detailed Description

Definition at line 44 of file cRVisualTriMesh.h.


Member Typedef Documentation

typedef const cRTriMeshFace* n2l::cRVisualTriMesh::tConstFaceIterator
 

Definition at line 61 of file cRVisualTriMesh.h.

typedef const tVector3f* n2l::cRVisualTriMesh::tConstVertexIterator
 

Definition at line 58 of file cRVisualTriMesh.h.

typedef tVector3f* n2l::cRVisualTriMesh::tVertexIterator
 

Definition at line 59 of file cRVisualTriMesh.h.


Constructor & Destructor Documentation

n2l::cRVisualTriMesh::cRVisualTriMesh  ) 
 

Definition at line 39 of file cRVisualTriMesh.cpp.

n2l::cRVisualTriMesh::cRVisualTriMesh const cRVisualTriMesh iMesh  ) 
 

Definition at line 45 of file cRVisualTriMesh.cpp.

n2l::cRVisualTriMesh::cRVisualTriMesh const cVfsNodeInterface iNode  ) 
 

Definition at line 52 of file cRVisualTriMesh.cpp.

References load().

n2l::cRVisualTriMesh::cRVisualTriMesh const cDynVar iDef  ) 
 

Definition at line 59 of file cRVisualTriMesh.cpp.

References load().

n2l::cRVisualTriMesh::~cRVisualTriMesh  ) 
 

Definition at line 66 of file cRVisualTriMesh.cpp.

References clear().


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  ) 
 

Completely empty the mesh.

Nothing will be drawn.

Definition at line 366 of file cRVisualTriMesh.cpp.

Referenced by operator=(), and ~cRVisualTriMesh().

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().

const cRTriMeshFace& n2l::cRVisualTriMesh::face const tUint  iIndex  )  const [inline]
 

Definition at line 161 of file cRVisualTriMesh.h.

Referenced by render().

const tConstFaceIterator n2l::cRVisualTriMesh::faceBegin  )  const [inline]
 

Definition at line 153 of file cRVisualTriMesh.h.

const tConstFaceIterator n2l::cRVisualTriMesh::faceEnd  )  const [inline]
 

Definition at line 154 of file cRVisualTriMesh.h.

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.

void n2l::cRVisualTriMesh::load const cVfsNodeInterface iNode  ) 
 

Load a N2L Visual TriMesh definition from the provided vfs node, and load it with the appropriat method.

Definition at line 72 of file cRVisualTriMesh.cpp.

References n2l::cVfsNodeInterface::name(), n2l::cDynVar::unserialize(), and n2l::vfsNodeFileWithHeader().

Referenced by cRVisualTriMesh().

cMaterial & n2l::cRVisualTriMesh::material const tUint iIndex  ) 
 

Definition at line 458 of file cRVisualTriMesh.cpp.

cMaterial & n2l::cRVisualTriMesh::material const tString iMaterialName  ) 
 

Definition at line 447 of file cRVisualTriMesh.cpp.

References name().

const tString& n2l::cRVisualTriMesh::name const tUint  iIndex  )  const [inline]
 

Definition at line 162 of file cRVisualTriMesh.h.

Referenced by material().

const tVector3f& n2l::cRVisualTriMesh::normal const tUint  iIndex  )  const [inline]
 

Definition at line 160 of file cRVisualTriMesh.h.

const tUint n2l::cRVisualTriMesh::numFaces  )  const [inline]
 

Definition at line 165 of file cRVisualTriMesh.h.

const tUint n2l::cRVisualTriMesh::numNames  )  const [inline]
 

Definition at line 166 of file cRVisualTriMesh.h.

const tUint n2l::cRVisualTriMesh::numVertices  )  const [inline]
 

Definition at line 164 of file cRVisualTriMesh.h.

cRVisualTriMesh & n2l::cRVisualTriMesh::operator= const cRVisualTriMesh iMesh  ) 
 

Assignment.

Note:
This assignment will deep copy non-const values fromt the mesh, but will shallow copy reference counted automatically handled children.

Definition at line 394 of file cRVisualTriMesh.cpp.

References clear(), mFaces, mMaterials, mNames, mNormals, mNumValues, mTexCoords, and mVertices.

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().

void n2l::cRVisualTriMesh::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).

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  ) 
 

Scale the model by this vector.

Definition at line 600 of file cRVisualTriMesh.cpp.

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]
 

Definition at line 159 of file cRVisualTriMesh.h.

const tVertexIterator n2l::cRVisualTriMesh::vertexBegin  )  [inline]
 

Definition at line 156 of file cRVisualTriMesh.h.

const tConstVertexIterator n2l::cRVisualTriMesh::vertexBegin  )  const [inline]
 

Definition at line 150 of file cRVisualTriMesh.h.

const tVertexIterator n2l::cRVisualTriMesh::vertexEnd  )  [inline]
 

Definition at line 157 of file cRVisualTriMesh.h.

const tConstVertexIterator n2l::cRVisualTriMesh::vertexEnd  )  const [inline]
 

Definition at line 151 of file cRVisualTriMesh.h.


The documentation for this class was generated from the following files:
©2013 Aaron Cameron