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

The Class responsible for drawing the basic 3D Renderable objects onto the screen. More...

#include <renderable3d.h>

Inheritance diagram for fireworks::graphics::Renderable3D:
Collaboration diagram for fireworks::graphics::Renderable3D:

Public Member Functions

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

Public Attributes

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

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 Class responsible for drawing the basic 3D Renderable objects onto the screen.

Every 3D renderable object is derived from this class

Constructor & Destructor Documentation

◆ Renderable3D() [1/4]

fireworks::graphics::Renderable3D::Renderable3D ( Transform  transform,
glm::vec4  color,
Primitive3D  primitive3d 
)
inline

Creates the renderable.

Parameters
transformThe Transform of the renderable
colorThe color of the renderable
primitive3dThe primitive shape of the renderable
Note
This overload is to be used with graphics::BatchRenderer3D

◆ Renderable3D() [2/4]

fireworks::graphics::Renderable3D::Renderable3D ( Transform  transform,
glm::vec4  color,
Primitive3D  primitive3d,
Shader shader 
)
inline

Creates the renderable.

Parameters
transformThe Transform of the renderable
colorThe color of the renderable The primitive shape of the renderable
Note
This overload is to be used with graphics::ShotRenderer3D

◆ Renderable3D() [3/4]

fireworks::graphics::Renderable3D::Renderable3D ( Transform  transform,
glm::vec4  color,
Primitive3D  primitive3d,
Shader shader,
Texture texture 
)
inline

Creates the renderable.

Parameters
transformThe Transform of the renderable
colorThe color of the renderable The primitive shape of the renderable
Note
This overload is to be used with graphics::ShotRenderer3D

◆ Renderable3D() [4/4]

fireworks::graphics::Renderable3D::Renderable3D ( )
inline

Create a empty renderable.

◆ ~Renderable3D()

virtual fireworks::graphics::Renderable3D::~Renderable3D ( )
inlinevirtual

Member Function Documentation

◆ gerPrimitive()

const Primitive3D& fireworks::graphics::Renderable3D::gerPrimitive ( ) const
inline

Gets the 3D primitive that is being rendered.

◆ getColor()

const glm::vec4& fireworks::graphics::Renderable3D::getColor ( ) const
inline

Gets the reference to the color of the renderable object.

◆ getIndicesSize()

GLsizei fireworks::graphics::Renderable3D::getIndicesSize ( ) const
inline

Gets the indices count of the 3d renderable.

◆ getInidces()

std::vector<GLushort> fireworks::graphics::Renderable3D::getInidces ( ) const
inline

Gets the indices of the 3d renderable.

◆ getTID()

const GLuint fireworks::graphics::Renderable3D::getTID ( ) const
inline

Gets the texture ID of the texture being used by the renderable.

◆ getTransform()

const Transform& fireworks::graphics::Renderable3D::getTransform ( ) const
inline

Gets the reference to the transform of the renderable object.

◆ getUV()

const std::vector<glm::vec2>& fireworks::graphics::Renderable3D::getUV ( ) const
inline

Gets the reference to the texture coordinates of the renderable.

◆ getVerts()

std::vector<VertexData3D> fireworks::graphics::Renderable3D::getVerts ( ) const
inline

Gets vertices of the 3d renderable.

◆ getVertsSize()

GLuint fireworks::graphics::Renderable3D::getVertsSize ( ) const
inline

Gets the vertices count of the 3d renderable.

◆ submit()

virtual void fireworks::graphics::Renderable3D::submit ( Renderer3D renderer) const
inlinevirtual

Virtual overload of the submit function, customize the way you can submit the renderable to the renderer.

Member Data Documentation

◆ m_Color

glm::vec4 fireworks::graphics::Renderable3D::m_Color
protected

Vertex color of the renderable.

◆ m_Indices

std::vector<GLushort> fireworks::graphics::Renderable3D::m_Indices
protected

The indices pool of the 3d object.

◆ m_Primitive3D

Primitive3D fireworks::graphics::Renderable3D::m_Primitive3D
protected

The basic primitive that is being rendered, (Does not denote the primitive used to render the 3d object)

◆ m_Texture

Texture* fireworks::graphics::Renderable3D::m_Texture

The texture used to draw the renderable object.

◆ m_Transform

Transform fireworks::graphics::Renderable3D::m_Transform
protected

The transform of the object in 3D space.

◆ m_UV

std::vector<glm::vec2> fireworks::graphics::Renderable3D::m_UV
mutableprotected

The texture coordinates of the 3d renderable.

◆ m_Vertices

std::vector<VertexData3D> fireworks::graphics::Renderable3D::m_Vertices
protected

The vertices pool of the 3d object.

◆ objectID

std::uint32_t fireworks::graphics::Renderable3D::objectID

The unique object ID of renderable object.

◆ shader

Shader* fireworks::graphics::Renderable3D::shader

The shader used to draw the renderable object.


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