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

The 3D mesh of a 3d renderable object. More...

#include <mesh.h>

Inheritance diagram for fireworks::graphics::Mesh:
Collaboration diagram for fireworks::graphics::Mesh:

Public Member Functions

 Mesh ()
 Creates an empty mesh object. More...
 
 Mesh (Transform transform, Primitive3D primitive, Shader *shader, Texture *texture=nullptr)
 Creates a primitive 3d Object. More...
 
 Mesh (std::vector< VertexData3D > verts, std::vector< GLushort >indices, std::vector< Texture > texs, Transform transform, Shader *shader)
 Creates a complex 3d mesh by loading 3d models. 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 ()
 
virtual void submit (Renderer3D *renderer) const
 Virtual overload of the submit function, customize the way you can submit the renderable to the renderer. More...
 
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...
 

Additional Inherited Members

- 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...
 
- 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

The 3D mesh of a 3d renderable object.

Creates am complex 3d mesh of any possible shape

Constructor & Destructor Documentation

◆ Mesh() [1/3]

fireworks::graphics::Mesh::Mesh ( )
inline

Creates an empty mesh object.

◆ Mesh() [2/3]

fireworks::graphics::Mesh::Mesh ( Transform  transform,
Primitive3D  primitive,
Shader shader,
Texture texture = nullptr 
)

Creates a primitive 3d Object.

Parameters
transformThe position of the 3d mesh in space
primitiveThe 3D primitive to draw into the world
shaderThe shader with which the mesh it to be renderer with
textureThe texture which will be applied to the 3d mesh

◆ Mesh() [3/3]

fireworks::graphics::Mesh::Mesh ( std::vector< VertexData3D verts,
std::vector< GLushort >  indices,
std::vector< Texture texs,
Transform  transform,
Shader shader 
)

Creates a complex 3d mesh by loading 3d models.

Parameters
vertsThe vertices of the mesh
indicesThe indices of the mesh
texsThe textures that will be applies to the 3d mesh
transformThe position of the mesh in space
shaderThe shader with which the mesh will be rendered with

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