Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Object Class Reference

Creates an object for use with OpenGL. Creates an object from an text file, this can then be used with OpenGL. More...

#include <Object.h>

Collaboration diagram for Object:
Collaboration graph

Public Member Functions

 Object (std::string objFileName)
 
 Object (std::string objFileName, std::string material)
 
 ~Object ()
 
GLuint getVAO ()
 
GLuint getTextureID ()
 
unsigned int getNumberOfVertices ()
 

Private Member Functions

void initialiseTexture (std::vector< float > vertexTextures)
 
void InitialiseVAO (std::string objFileName)
 

Private Attributes

GLuint vertexArrayObject
 
unsigned int numberOfVertices
 
std::string material
 
GLuint textureID
 

Detailed Description

Creates an object for use with OpenGL. Creates an object from an text file, this can then be used with OpenGL.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Object::Object ( std::string  objFileName)

Constructs an Object. Creates a vertex array object using a obj file location and OpenGL.

Parameters
objFileNameThe name of the obj file.

Here is the call graph for this function:

Object::Object ( std::string  objFileName,
std::string  material 
)

Constructs an Object. Creates a vertex array object using a obj file location and OpenGL.

Parameters
objFileNameThe name of the obj file.
materialThe name of the material file.

Here is the call graph for this function:

Object::~Object ( )

Destructs an Object. Destructs the Object deleting the Object from memory.

Here is the call graph for this function:

Member Function Documentation

unsigned int Object::getNumberOfVertices ( )

Getter # Returns the number of vertices.

Returns
The number of vertices.
GLuint Object::getTextureID ( )

Getter # Returns the Texture ID.

Returns
The texture ID.
GLuint Object::getVAO ( )

Getter # Returns the vertex array object.

Returns
The vertex array object.
void Object::initialiseTexture ( std::vector< float >  vertexTextures)
private

Initialise the texture.

Parameters
vertexTexturesThe vertex textures vector.

Here is the call graph for this function:

Here is the caller graph for this function:

void Object::InitialiseVAO ( std::string  objFileName)
private

Initialise the vertex array object.

Parameters
objFileNameThe name of the obj file.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::string Object::material
private

The name of the material

unsigned int Object::numberOfVertices
private

Number of vertices in the model

GLuint Object::textureID
private

The Texture

GLuint Object::vertexArrayObject
private

The Vertex Array Object for use with OpenGL


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