Public Member Functions | Public Attributes

GMesh Class Reference

#include <GMesh.h>

Inheritance diagram for GMesh:
GGraphicsObject GObject GAnimatedMesh

List of all members.

Public Member Functions

int ComputeTangentsAndBinormals ()
 model materials
virtual int Draw (double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS)
virtual int DrawSprites (double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS)
 Draw mesh.
virtual int OutLineMappedVertices (int FLAGS)
 Draw sprites.
virtual int Skin (int FLAGS)
 outline vertices that are registered in the vertexmapper structure (debug function)
virtual int CreateDefaultVertexMapper (int FLAGS)
 skin mesh
virtual int SetVertexMapper (vector< vertexmapper_t > vm)
virtual int SetupVBO ()
 GMesh (void)
 GMesh (GModel *_model)
void SetModel (GModel *_model)
GModelGetModel (void)
GSkeletonGetSkeleton (void)
int GetVertexBufferSize (void)
int GetVertexCount (void)
unsigned int * GetIndexArray (void)
float * GetTangentArray (void)
float * GetBinormalArray (void)
float * GetNormalArray (void)
float * GetVertexArray (void)
float * GetTexCoordArray (void)
int BeginWithZero (int FLAGS)
 decerement all vertex indexes in faces
GVec4fGetVertex (int i)
 decerement all vertex indexes in faces if no reference to index 0 is made
GVec4fGetNormal (int i)
 acquire pointer to an untransformed vertex
void Scale (float scale)
 acquire pointer to an untransformed normal
void Rotate (GVec4f *Rotations)

Public Attributes

int materialId
int colorTexId
int normalTexId
GModelmodel
vector< vertexmapper_tvertexmapper
 The model this mesh is part of.
GVec4f WorldCoordinates
 vertex mapping structure
vector< GVec4fvertices
 World-space Coordinates.
vector< GVec4fnormals
 model vertices in reference pose
vector< GVec4ftangents
 model normals in reference pose
vector< GVec4fbinormals
vector< texcoord2_ttexcoords
GMatrix16 Transformations
 mesh texture coordinates
unsigned int * IndexArray
 all transformations applied to a mesh
float * VertexArray
 index array for use with VBA/VBO
float * NormalArray
 VertexArray for use with VBA/VBO.
float * TexCoordArray
 NormalArray for use with VBA/VBO.
float * TangentArray
 TexCoordArray for use with VBA/VBO.
float * BinormalArray
unsigned int vboId [10]
int iFaces
 VBO ids.
int iVerts
 number of faces
int iNumVertices
 number of vertices
int iVBufferSize
 number of vertices in indexbuffer
vector< face_tfaces
 size of vertex buffer (= iVerts * 3)
vector< material_tmaterials
 model faces

Constructor & Destructor Documentation

GMesh::GMesh ( void   ) 
GMesh::GMesh ( GModel _model  ) 

Member Function Documentation

int GMesh::BeginWithZero ( int  FLAGS  ) 

decerement all vertex indexes in faces

int GMesh::ComputeTangentsAndBinormals (  ) 

model materials

int GMesh::CreateDefaultVertexMapper ( int  FLAGS  )  [virtual]

skin mesh

Reimplemented in GAnimatedMesh.

int GMesh::Draw ( double  time,
double  dtime,
GMatrix16 viewmatrix,
GMatrix16 worldmatrix,
int  FLAGS 
) [virtual]

Implements GGraphicsObject.

Reimplemented in GAnimatedMesh.

int GMesh::DrawSprites ( double  time,
double  dtime,
GMatrix16 viewmatrix,
GMatrix16 worldmatrix,
int  FLAGS 
) [virtual]

Draw mesh.

Implements GGraphicsObject.

Reimplemented in GAnimatedMesh.

float * GMesh::GetBinormalArray ( void   ) 
unsigned int * GMesh::GetIndexArray ( void   ) 
GModel * GMesh::GetModel ( void   ) 
GVec4f * GMesh::GetNormal ( int  i  ) 

acquire pointer to an untransformed vertex

acquire pointer to an untransformed normal

float * GMesh::GetNormalArray ( void   ) 
GSkeleton * GMesh::GetSkeleton ( void   ) 
float * GMesh::GetTangentArray ( void   ) 
float * GMesh::GetTexCoordArray ( void   ) 
GVec4f * GMesh::GetVertex ( int  i  ) 

decerement all vertex indexes in faces if no reference to index 0 is made

acquire pointer to an untransformed vertex

float * GMesh::GetVertexArray ( void   ) 
int GMesh::GetVertexBufferSize ( void   ) 
int GMesh::GetVertexCount ( void   ) 
int GMesh::OutLineMappedVertices ( int  FLAGS  )  [virtual]

Draw sprites.

Reimplemented in GAnimatedMesh.

void GMesh::Rotate ( GVec4f Rotations  ) 
void GMesh::Scale ( float  scale  ) 

acquire pointer to an untransformed normal

void GMesh::SetModel ( GModel _model  ) 
int GMesh::SetupVBO ( void   )  [virtual]

Reimplemented in GAnimatedMesh.

int GMesh::SetVertexMapper ( vector< vertexmapper_t vm  )  [virtual]

Reimplemented in GAnimatedMesh.

int GMesh::Skin ( int  FLAGS  )  [virtual]

outline vertices that are registered in the vertexmapper structure (debug function)

Reimplemented in GAnimatedMesh.


Member Data Documentation

size of vertex buffer (= iVerts * 3)

VBO ids.

unsigned int* GMesh::IndexArray

all transformations applied to a mesh

number of vertices

number of vertices in indexbuffer

number of faces

model faces

VertexArray for use with VBA/VBO.

model vertices in reference pose

TexCoordArray for use with VBA/VBO.

model normals in reference pose

NormalArray for use with VBA/VBO.

mesh texture coordinates

unsigned int GMesh::vboId[10]

index array for use with VBA/VBO

The model this mesh is part of.

World-space Coordinates.

vertex mapping structure


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines