GCP Assignment 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Object Class Reference

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)
 Creates a vertex array object using a obj file location and OpenGL. More...
 
 Object (std::string objFileName, std::string material)
 Creates a vertex array object using a obj file location and OpenGL. More...
 
 ~Object ()
 Destructs an Object. More...
 
GLuint getVAO ()
 Returns the vertex array object. More...
 
GLuint getTextureID ()
 Returns the Texture ID. More...
 
unsigned int getNumberOfVertices ()
 Returns the number of vertices. More...
 

Private Member Functions

void initialiseTexture (std::vector< float > vertexTextures)
 Initialise the texture. More...
 
void InitialiseVAO (std::string objFileName)
 Initialise the vertex array object. More...
 

Private Attributes

GLuint vertexArrayObject
 The Vertex Array Object for use with OpenGL. More...
 
unsigned int numberOfVertices
 Number of vertices in the model. More...
 
std::string material
 The name of the material. More...
 
GLuint textureID
 The Texture. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Object() [1/2]

Object::Object ( std::string  objFileName)

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() [2/2]

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

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::~Object ( )

Destructs an Object.

Member Function Documentation

◆ getNumberOfVertices()

unsigned int Object::getNumberOfVertices ( )

Returns the number of vertices.

Returns
The number of vertices.
Here is the caller graph for this function:

◆ getTextureID()

GLuint Object::getTextureID ( )

Returns the Texture ID.

Returns
The texture ID.
Here is the caller graph for this function:

◆ getVAO()

GLuint Object::getVAO ( )

Returns the vertex array object.

Returns
The vertex array object.
Here is the caller graph for this function:

◆ initialiseTexture()

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:

◆ InitialiseVAO()

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

◆ material

std::string Object::material
private

The name of the material.

◆ numberOfVertices

unsigned int Object::numberOfVertices
private

Number of vertices in the model.

◆ textureID

GLuint Object::textureID
private

The Texture.

◆ vertexArrayObject

GLuint Object::vertexArrayObject
private

The Vertex Array Object for use with OpenGL.


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