NSMeshes::TMesh Class Reference

This class defines mesh loaded from mesh file. More...

#include <Mesh.h>

Inheritance diagram for NSMeshes::TMesh:

Inheritance graph
[legend]
Collaboration diagram for NSMeshes::TMesh:

Collaboration graph
[legend]
List of all members.

Public Member Functions

TRendererVertexBufferGetVB (void) const
 Returns pointer to actual vertex buffer used for this mesh.
TRendererIndexBufferGetIB (void) const
 Returns pointer to actual index buffer used for this mesh.
const TMeshRenderInfoGetRenderInfo (void) const
 Returns structure with information required for rendering mesh from its VB and IB.
const TDeclarationGetDeclaration (void) const
 Returns vertex type number of vertices used in this mesh.
const TStringGetName (void) const
 Returns name of this mesh.
void AddRefs (void)
 Increase number of references to this mesh.
void Release (void)
 Decreases number of references to this mesh.

Friends

class TMeshManager
class TArrayPtrs< TMesh >

Detailed Description

This class defines mesh loaded from mesh file.

Mesh must contain TRIANGLES!!!.

TMesh contains reference to TDeclaration which is loaded from TDeclarationManager!!! TMesh contains VB and IB for renderer. Also can reload its content (for device-lost state)

You cannot create TMesh directly - it can be be created only via TMeshManager!!!

Definition at line 155 of file Mesh.h.


Member Function Documentation

void NSMeshes::TMesh::AddRefs void   )  [inline]
 

Increase number of references to this mesh.

Definition at line 271 of file Mesh.h.

Referenced by NSMeshes::TMeshManager::GetMesh().

const TDeclaration * NSMeshes::TMesh::GetDeclaration void   )  const [inline]
 

Returns vertex type number of vertices used in this mesh.

Definition at line 255 of file Mesh.h.

TRendererIndexBuffer * NSMeshes::TMesh::GetIB void   )  const [inline]
 

Returns pointer to actual index buffer used for this mesh.

Warning:
This method DOESN'T increase number of references to this IB. You should use this method only for short-term events as rendering via TRenderer methods. For long-term events you must call TRendererIndexBuffer::AddRefs method.

Definition at line 241 of file Mesh.h.

const TString & NSMeshes::TMesh::GetName void   )  const [inline]
 

Returns name of this mesh.

Note:
Its name of file where from was mesh loaded.

Definition at line 264 of file Mesh.h.

Referenced by NSMeshes::TMeshManager::LoadRendererResources().

const TMeshRenderInfo & NSMeshes::TMesh::GetRenderInfo void   )  const [inline]
 

Returns structure with information required for rendering mesh from its VB and IB.

Definition at line 248 of file Mesh.h.

TRendererVertexBuffer * NSMeshes::TMesh::GetVB void   )  const [inline]
 

Returns pointer to actual vertex buffer used for this mesh.

Warning:
This method DOESN'T increase number of references to this VB. You should use this method only for short-term events as rendering via TRenderer methods. For long-term events you must call TRendererVertexBuffer::AddRefs method.

Definition at line 230 of file Mesh.h.

void NSMeshes::TMesh::Release void   )  [inline]
 

Decreases number of references to this mesh.

Warning:
After calling this method caller should set pointer to NULL. This is needed because mesh may be destroyed when number of references is equa to ZERO!!!

Definition at line 282 of file Mesh.h.

References DBGASSERT_GRAPHICLOW, and NSMeshes::TMeshManager::DestroyMesh().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class TArrayPtrs< TMesh > [friend]
 

Definition at line 158 of file Mesh.h.

friend class TMeshManager [friend]
 

Definition at line 157 of file Mesh.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 28 23:08:47 2007 for Joy4D by  doxygen 1.4.6-NO