PanoramaViewer
 All Classes Namespaces Files Functions Variables Macros Pages
LayerSceneGraph::Mesh Class Reference

#include <Mesh.h>

Public Member Functions

 Mesh ()
 
 Mesh (GLfloat *pCoord, GLfloat *texCoord, GLfloat *normals, GLuint *ind, GLuint numIndex, GLuint numVertex, Texture *tex)
 
 Mesh (GLfloat *pCoord, GLfloat *texCoord, GLfloat *normals, GLuint *ind, GLuint numIndex, GLuint numVertex, Texture *tex, GLfloat *colors)
 
 Mesh (GLfloat *pCoord, GLfloat *colors, GLfloat *normals, GLuint *ind, GLuint numIndex, GLuint numVertex)
 
virtual ~Mesh ()
 
void loadMesh (string filename)
 
void draw ()
 
TexturegetTexture ()
 
void setTexture (Texture *texture)
 

Private Attributes

GLfloat * positionCoordinates
 
GLuint * indices
 
GLfloat * textureCoordinates
 
GLfloat * normals
 
GLfloat * colorCoordinates
 
GLuint numIndices
 
GLuint numVertices
 
Texturetexture
 
GLuint bufferObject [MAX_BUFFER]
 

Constructor & Destructor Documentation

LayerSceneGraph::Mesh::Mesh ( )

Default constructor. All pointers are set to null and all numeric values are set to zero.

LayerSceneGraph::Mesh::Mesh ( GLfloat *  pCoord,
GLfloat *  texCoord,
GLfloat *  normals,
GLuint *  ind,
GLuint  numIndex,
GLuint  numVertex,
Texture tex 
)
LayerSceneGraph::Mesh::Mesh ( GLfloat *  pCoord,
GLfloat *  texCoord,
GLfloat *  normals,
GLuint *  ind,
GLuint  numIndex,
GLuint  numVertex,
Texture tex,
GLfloat *  colors 
)
LayerSceneGraph::Mesh::Mesh ( GLfloat *  pCoord,
GLfloat *  colors,
GLfloat *  normals,
GLuint *  ind,
GLuint  numIndex,
GLuint  numVertex 
)
LayerSceneGraph::Mesh::~Mesh ( )
virtual

Destructor. Releases memory allocated for position coordinates, texture coordinates, indices, normals and also deletes texture

Member Function Documentation

void LayerSceneGraph::Mesh::draw ( )

Encapsulates all calls to OpenGL necessaries for drawing this mesh

Texture * LayerSceneGraph::Mesh::getTexture ( )

Returns the texture used in this mesh.

void LayerSceneGraph::Mesh::loadMesh ( string  filename)

This method reads a file format such as OFF or OBJ and loads a mesh from it

Todo:
Still not implemented
void LayerSceneGraph::Mesh::setTexture ( Texture texture)

Sets a new texture for this mesh

Member Data Documentation

GLuint LayerSceneGraph::Mesh::bufferObject[MAX_BUFFER]
private
GLfloat* LayerSceneGraph::Mesh::colorCoordinates
private
GLuint* LayerSceneGraph::Mesh::indices
private
GLfloat* LayerSceneGraph::Mesh::normals
private
GLuint LayerSceneGraph::Mesh::numIndices
private
GLuint LayerSceneGraph::Mesh::numVertices
private
GLfloat* LayerSceneGraph::Mesh::positionCoordinates
private
Texture* LayerSceneGraph::Mesh::texture
private
GLfloat* LayerSceneGraph::Mesh::textureCoordinates
private

The documentation for this class was generated from the following files: