Mesh Class Reference

#include <Mesh.h>

List of all members.

Public Member Functions

 Mesh (const char *name)
virtual ~Mesh ()
const char * getName ()
bool getSphereMap ()
VectorgetMin ()
VectorgetMax ()
Vector4getAmbientColor ()
Vector4getDiffuseColor ()
Vector4getSpecularColor ()
Vector4getEmissiveColor ()
Vector4getAmbientNoTexColor ()
Vector4getDiffuseNoTexColor ()
Vector4getSpecularNoTexColor ()
Vector4getEmissiveNoTexColor ()
float & getShininessColor ()
const char * getTextureName ()
const char * getATextureName ()
std::vector< int > & getCollapseMap ()
std::vector< Face * > & getFaces ()
FacegetFace (int faceIndex)
std::vector< Vertex * > & getVertexes ()
VertexgetVertex (int vertexIndex)
bool & getReferencesBones ()
void move (Vector &movement)
void setupCollapse ()
void insertFace (Face &face)
void insertVertex (Vertex &vertex)
void setTextureName (const char *t)
void setATextureName (const char *t)
void setFaceNormal (Vector &normal, int faceIndex, int normalIndex)
void setFaceTCoord (Vector &coord, int faceIndex, int coordIndex)

Protected Attributes

std::string name_
std::string textureName_
std::string aTextureName_
std::vector< Face * > faces_
std::vector< Vertex * > vertexes_
std::vector< int > collapseMap_
bool referencesBones_
bool sphereMap_
float shininessColor_
Vector4 diffuseColor_
Vector4 specularColor_
Vector4 ambientColor_
Vector4 emissiveColor_
Vector4 diffuseNoTexColor_
Vector4 specularNoTexColor_
Vector4 ambientNoTexColor_
Vector4 emissiveNoTexColor_
Vector min_
Vector max_


Detailed Description

Definition at line 31 of file Mesh.h.


Constructor & Destructor Documentation

Mesh::Mesh ( const char *  name  ) 

Definition at line 26 of file Mesh.cpp.

Mesh::~Mesh (  )  [virtual]

Definition at line 31 of file Mesh.cpp.

References faces_, and vertexes_.


Member Function Documentation

const char* Mesh::getName (  )  [inline]

Definition at line 38 of file Mesh.h.

References name_.

Referenced by MissileMesh::MissileMesh(), and TankMesh::setupTankMesh().

bool Mesh::getSphereMap (  )  [inline]

Definition at line 39 of file Mesh.h.

References sphereMap_.

Referenced by ModelRendererMesh::drawMesh().

Vector& Mesh::getMin (  )  [inline]

Definition at line 40 of file Mesh.h.

References min_.

Referenced by MissileMesh::MissileMesh(), and TankMesh::setupTankMesh().

Vector& Mesh::getMax (  )  [inline]

Definition at line 41 of file Mesh.h.

References max_.

Referenced by MissileMesh::MissileMesh(), and TankMesh::setupTankMesh().

Vector4& Mesh::getAmbientColor (  )  [inline]

Definition at line 42 of file Mesh.h.

References ambientColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getDiffuseColor (  )  [inline]

Definition at line 43 of file Mesh.h.

References diffuseColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getSpecularColor (  )  [inline]

Definition at line 44 of file Mesh.h.

References specularColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getEmissiveColor (  )  [inline]

Definition at line 45 of file Mesh.h.

References emissiveColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getAmbientNoTexColor (  )  [inline]

Definition at line 46 of file Mesh.h.

References ambientNoTexColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getDiffuseNoTexColor (  )  [inline]

Definition at line 47 of file Mesh.h.

References diffuseNoTexColor_.

Referenced by ModelRendererMesh::drawMesh(), ModelRendererMesh::drawVerts(), and MSModelFactory::loadFile().

Vector4& Mesh::getSpecularNoTexColor (  )  [inline]

Definition at line 48 of file Mesh.h.

References specularNoTexColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

Vector4& Mesh::getEmissiveNoTexColor (  )  [inline]

Definition at line 49 of file Mesh.h.

References emissiveNoTexColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

float& Mesh::getShininessColor (  )  [inline]

Definition at line 50 of file Mesh.h.

References shininessColor_.

Referenced by ModelRendererMesh::drawMesh(), and MSModelFactory::loadFile().

const char* Mesh::getTextureName (  )  [inline]

Definition at line 51 of file Mesh.h.

References textureName_.

Referenced by ModelRendererMesh::drawMesh().

const char* Mesh::getATextureName (  )  [inline]

Definition at line 53 of file Mesh.h.

References aTextureName_.

Referenced by ModelRendererMesh::drawMesh().

std::vector<int>& Mesh::getCollapseMap (  )  [inline]

Definition at line 56 of file Mesh.h.

References collapseMap_.

std::vector<Face *>& Mesh::getFaces (  )  [inline]

Definition at line 58 of file Mesh.h.

References faces_.

Referenced by ASEModelFactory::calculateTexCoords(), ModelRendererMesh::drawMesh(), ModelRendererMesh::drawVerts(), Model::getNumberTriangles(), and Model::setupColor().

Face* Mesh::getFace ( int  faceIndex  )  [inline]

Definition at line 60 of file Mesh.h.

References DIALOG_ASSERT, and faces_.

std::vector<Vertex *>& Mesh::getVertexes (  )  [inline]

Definition at line 63 of file Mesh.h.

References vertexes_.

Referenced by Model::setupBones().

Vertex* Mesh::getVertex ( int  vertexIndex  )  [inline]

Definition at line 65 of file Mesh.h.

References DIALOG_ASSERT, and vertexes_.

Referenced by ASEModelFactory::calculateTexCoords(), ModelRendererMesh::drawVerts(), Model::setupBones(), and Model::setupColor().

bool& Mesh::getReferencesBones (  )  [inline]

Definition at line 68 of file Mesh.h.

References referencesBones_.

Referenced by ModelRendererMesh::drawMesh(), and Model::setupBones().

void Mesh::move ( Vector movement  ) 

Definition at line 68 of file Mesh.cpp.

References max_, min_, and vertexes_.

void Mesh::setupCollapse (  ) 

Definition at line 90 of file Mesh.cpp.

References collapseMap_, faces_, MeshLOD::progressiveMesh(), and vertexes_.

void Mesh::insertFace ( Face face  )  [inline]

Definition at line 75 of file Mesh.h.

References faces_.

Referenced by MSModelFactory::loadFile().

void Mesh::insertVertex ( Vertex vertex  ) 

Definition at line 47 of file Mesh.cpp.

References MAX, max_, MIN, min_, Vertex::position, and vertexes_.

Referenced by MSModelFactory::loadFile().

void Mesh::setTextureName ( const char *  t  ) 

Definition at line 81 of file Mesh.cpp.

References sphereMap_, LangStringUtil::strcmp(), LangStringUtil::strstr(), and textureName_.

Referenced by ASEModelFactory::calculateTexCoords(), and MSModelFactory::loadFile().

void Mesh::setATextureName ( const char *  t  )  [inline]

Definition at line 79 of file Mesh.h.

References aTextureName_.

Referenced by MSModelFactory::loadFile().

void Mesh::setFaceNormal ( Vector normal,
int  faceIndex,
int  normalIndex 
) [inline]

Definition at line 80 of file Mesh.h.

References DIALOG_ASSERT, and faces_.

Referenced by MSModelFactory::loadFile().

void Mesh::setFaceTCoord ( Vector coord,
int  faceIndex,
int  coordIndex 
) [inline]

Definition at line 83 of file Mesh.h.

References DIALOG_ASSERT, and faces_.

Referenced by MSModelFactory::loadFile().


Member Data Documentation

std::string Mesh::name_ [protected]

Definition at line 88 of file Mesh.h.

Referenced by getName().

std::string Mesh::textureName_ [protected]

Definition at line 89 of file Mesh.h.

Referenced by getTextureName(), and setTextureName().

std::string Mesh::aTextureName_ [protected]

Definition at line 89 of file Mesh.h.

Referenced by getATextureName(), and setATextureName().

std::vector<Face *> Mesh::faces_ [protected]

Definition at line 90 of file Mesh.h.

Referenced by getFace(), getFaces(), insertFace(), setFaceNormal(), setFaceTCoord(), setupCollapse(), and ~Mesh().

std::vector<Vertex *> Mesh::vertexes_ [protected]

Definition at line 91 of file Mesh.h.

Referenced by getVertex(), getVertexes(), insertVertex(), move(), setupCollapse(), and ~Mesh().

std::vector<int> Mesh::collapseMap_ [protected]

Definition at line 92 of file Mesh.h.

Referenced by getCollapseMap(), and setupCollapse().

bool Mesh::referencesBones_ [protected]

Definition at line 93 of file Mesh.h.

Referenced by getReferencesBones().

bool Mesh::sphereMap_ [protected]

Definition at line 94 of file Mesh.h.

Referenced by getSphereMap(), and setTextureName().

float Mesh::shininessColor_ [protected]

Definition at line 95 of file Mesh.h.

Referenced by getShininessColor().

Vector4 Mesh::diffuseColor_ [protected]

Definition at line 96 of file Mesh.h.

Referenced by getDiffuseColor().

Vector4 Mesh::specularColor_ [protected]

Definition at line 96 of file Mesh.h.

Referenced by getSpecularColor().

Vector4 Mesh::ambientColor_ [protected]

Definition at line 97 of file Mesh.h.

Referenced by getAmbientColor().

Vector4 Mesh::emissiveColor_ [protected]

Definition at line 97 of file Mesh.h.

Referenced by getEmissiveColor().

Vector4 Mesh::diffuseNoTexColor_ [protected]

Definition at line 98 of file Mesh.h.

Referenced by getDiffuseNoTexColor().

Vector4 Mesh::specularNoTexColor_ [protected]

Definition at line 98 of file Mesh.h.

Referenced by getSpecularNoTexColor().

Vector4 Mesh::ambientNoTexColor_ [protected]

Definition at line 99 of file Mesh.h.

Referenced by getAmbientNoTexColor().

Vector4 Mesh::emissiveNoTexColor_ [protected]

Definition at line 99 of file Mesh.h.

Referenced by getEmissiveNoTexColor().

Vector Mesh::min_ [protected]

Definition at line 100 of file Mesh.h.

Referenced by getMin(), insertVertex(), and move().

Vector Mesh::max_ [protected]

Definition at line 100 of file Mesh.h.

Referenced by getMax(), insertVertex(), and move().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:04 2009 for Scorched3D by  doxygen 1.5.3