Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
fireworks::graphics::Model Class Reference

A 3D model object loaded externally. More...

#include <model.h>

Inheritance diagram for fireworks::graphics::Model:
Collaboration diagram for fireworks::graphics::Model:

Public Member Functions

 Model (std::string path, Transform transform, Shader *shader)
 Loads an external 3d model. More...
 
 ~Model ()
 
MeshgetMasterMesh ()
 Returns the root mesh that is a congregation of all sub-meshes. More...
 
- Public Member Functions inherited from fireworks::graphics::Renderable3D
 Renderable3D (Transform transform, glm::vec4 color, Primitive3D primitive3d)
 Creates the renderable. More...
 
 Renderable3D (Transform transform, glm::vec4 color, Primitive3D primitive3d, Shader *shader)
 Creates the renderable. More...
 
 Renderable3D (Transform transform, glm::vec4 color, Primitive3D primitive3d, Shader *shader, Texture *texture)
 Creates the renderable. More...
 
 Renderable3D ()
 Create a empty renderable. More...
 
virtual ~Renderable3D ()
 
const TransformgetTransform () const
 Gets the reference to the transform of the renderable object. More...
 
const glm::vec4 & getColor () const
 Gets the reference to the color of the renderable object. More...
 
const std::vector< glm::vec2 > & getUV () const
 Gets the reference to the texture coordinates of the renderable. More...
 
const GLuint getTID () const
 Gets the texture ID of the texture being used by the renderable. More...
 
const Primitive3DgerPrimitive () const
 Gets the 3D primitive that is being rendered. More...
 
std::vector< VertexData3DgetVerts () const
 Gets vertices of the 3d renderable. More...
 
GLuint getVertsSize () const
 Gets the vertices count of the 3d renderable. More...
 
std::vector< GLushort > getInidces () const
 Gets the indices of the 3d renderable. More...
 
GLsizei getIndicesSize () const
 Gets the indices count of the 3d renderable. More...
 

Public Attributes

GLuint vertexCount
 The vertex count of the 3d model. More...
 
GLuint trisCount
 The triangles count of the 3d model. More...
 
std::vector< SubMeshsubMeshes
 Collections of sub-meshes that make up the 3d models. More...
 
IndexBuffermodelIBO
 The index buffer of the 3d model. More...
 
- Public Attributes inherited from fireworks::graphics::Renderable3D
std::uint32_t objectID
 The unique object ID of renderable object. More...
 
Shadershader
 The shader used to draw the renderable object. More...
 
Texturem_Texture
 The texture used to draw the renderable object. More...
 

Additional Inherited Members

- Protected Attributes inherited from fireworks::graphics::Renderable3D
Transform m_Transform
 The transform of the object in 3D space. More...
 
glm::vec4 m_Color
 Vertex color of the renderable. More...
 
Primitive3D m_Primitive3D
 The basic primitive that is being rendered, (Does not denote the primitive used to render the 3d object) More...
 
std::vector< glm::vec2 > m_UV
 The texture coordinates of the 3d renderable. More...
 
std::vector< VertexData3Dm_Vertices
 The vertices pool of the 3d object. More...
 
std::vector< GLushort > m_Indices
 The indices pool of the 3d object. More...
 

Detailed Description

A 3D model object loaded externally.

Constructor & Destructor Documentation

◆ Model()

fireworks::graphics::Model::Model ( std::string  path,
Transform  transform,
Shader shader 
)

Loads an external 3d model.

Parameters
pathThe path of the 3d models
transformThe transform of the 3d model in 3D space
shaderThe shader with which the 3d models is rendered with

◆ ~Model()

fireworks::graphics::Model::~Model ( )

Member Function Documentation

◆ getMasterMesh()

Mesh& fireworks::graphics::Model::getMasterMesh ( )
inline

Returns the root mesh that is a congregation of all sub-meshes.

Member Data Documentation

◆ modelIBO

IndexBuffer* fireworks::graphics::Model::modelIBO

The index buffer of the 3d model.

◆ subMeshes

std::vector<SubMesh> fireworks::graphics::Model::subMeshes

Collections of sub-meshes that make up the 3d models.

◆ trisCount

GLuint fireworks::graphics::Model::trisCount

The triangles count of the 3d model.

◆ vertexCount

GLuint fireworks::graphics::Model::vertexCount

The vertex count of the 3d model.


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