The Class responsible for drawing the basic Renderable objects onto the screen.
More...
#include <renderable2d.h>
The Class responsible for drawing the basic Renderable objects onto the screen.
Every renderable type is derived from this class
◆ Renderable2D() [1/3]
| fireworks::graphics::Renderable2D::Renderable2D |
( |
glm::vec3 |
position, |
|
|
glm::vec2 |
size, |
|
|
glm::vec4 |
color, |
|
|
Primitive2D |
primitive2d |
|
) |
| |
|
inline |
Creates the renderable.
- Parameters
-
| position | The position of the renderable |
| size | The Size of the renderable |
| color | The color of the renderable The primitive shape of the renderable (Quad or Triangle) |
- Note
- This overload is to be used with graphics::BatchRenderer2D
◆ Renderable2D() [2/3]
| fireworks::graphics::Renderable2D::Renderable2D |
( |
glm::vec3 |
position, |
|
|
glm::vec2 |
size, |
|
|
glm::vec4 |
color, |
|
|
Primitive2D |
primitive2d, |
|
|
Shader * |
shader |
|
) |
| |
|
inline |
Creates the renderable.
- Parameters
-
| position | The position of the renderable |
| size | The Size of the renderable |
| color | The color of the renderable The primitive shape of the renderable (Quad or Triangle) |
| shader | The shader with which the renderable is to be rendered with |
- Note
- This overload is to be used with graphics::BatchRenderer2D
◆ ~Renderable2D()
| virtual fireworks::graphics::Renderable2D::~Renderable2D |
( |
| ) |
|
|
inlinevirtual |
◆ Renderable2D() [3/3]
| fireworks::graphics::Renderable2D::Renderable2D |
( |
| ) |
|
|
inlineprotected |
Create an empty renderable.
◆ AddComponent() [1/2]
Template methods of various ways of adding components to the renderable.
- Parameters
-
| component | The component to add to the renderable |
◆ AddComponent() [2/2]
The Rigidbody2D overload template.
◆ addedRigidBody2D()
| virtual void fireworks::graphics::Renderable2D::addedRigidBody2D |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ flipX()
| void fireworks::graphics::Renderable2D::flipX |
( |
| ) |
|
|
inline |
Flip the Renderable along the X-axis.
◆ flipY()
| void fireworks::graphics::Renderable2D::flipY |
( |
| ) |
|
|
inline |
Flip the Renderable along the Y-axis.
◆ getColor()
| const glm::vec4& fireworks::graphics::Renderable2D::getColor |
( |
| ) |
const |
|
inline |
Gets the color of the renderable.
◆ getPosition()
| const glm::vec3& fireworks::graphics::Renderable2D::getPosition |
( |
| ) |
const |
|
inline |
Gets the position of the Renderable.
Checks the components and returns the proper position after making necessary calculations and conditional analysis
◆ getPrimitive()
| const Primitive2D fireworks::graphics::Renderable2D::getPrimitive |
( |
| ) |
const |
|
inline |
Gets the primitive shape that is used to draw the renderable.
◆ getRotation()
| const float& fireworks::graphics::Renderable2D::getRotation |
( |
| ) |
const |
|
inline |
Gets the rotation of the Renderable.
Checks the components and returns the proper rotation after making necessary calculations and conditional analysis
◆ getSize()
| const glm::vec2& fireworks::graphics::Renderable2D::getSize |
( |
| ) |
const |
|
inline |
Gets the size of the renderable.
◆ getTexture()
| const Texture* fireworks::graphics::Renderable2D::getTexture |
( |
| ) |
const |
|
inline |
Gets the texture that is used to draw the renderable.
◆ getTID()
| const GLuint fireworks::graphics::Renderable2D::getTID |
( |
| ) |
const |
|
inline |
Gets the ID of the renderables texture.
◆ getUV()
| const std::vector<glm::vec2>& fireworks::graphics::Renderable2D::getUV |
( |
| ) |
const |
|
inline |
Gets the UV coordinates of the 2D Renderable.
◆ submit()
| virtual void fireworks::graphics::Renderable2D::submit |
( |
Renderer2D * |
renderer | ) |
const |
|
inlinevirtual |
Virtual overload of the submit function, customize the way you can submit the renderable to the renderer.
Reimplemented in fireworks::graphics::Group.
◆ unflipX()
| void fireworks::graphics::Renderable2D::unflipX |
( |
| ) |
|
|
inline |
Unflip the Renderable along the X-axis.
◆ unflipY()
| void fireworks::graphics::Renderable2D::unflipY |
( |
| ) |
|
|
inline |
Unflip the Renderable along the X-axis.
◆ components
The collection of Components that is attached to the renderable.
◆ flippedX
| bool fireworks::graphics::Renderable2D::flippedX |
tells whether or not the renderable is flipped on the X-axis or not
◆ flippedY
| bool fireworks::graphics::Renderable2D::flippedY |
tells whether or not the renderable is flipped on the Y-axis or not
◆ m_Color
| glm::vec4 fireworks::graphics::Renderable2D::m_Color |
|
protected |
The color of the renderable.
◆ m_Position
| glm::vec3 fireworks::graphics::Renderable2D::m_Position |
|
protected |
The position of the renderable.
◆ m_Primitive2D
| Primitive2D fireworks::graphics::Renderable2D::m_Primitive2D |
|
protected |
The primitive that is used to draw the renderable.
◆ m_Rotation
| float fireworks::graphics::Renderable2D::m_Rotation |
|
protected |
The rotation of the renderable along the Z-Axis.
◆ m_Size
| glm::vec2 fireworks::graphics::Renderable2D::m_Size |
|
protected |
The size of the renderable.
◆ m_Texture
| Texture* fireworks::graphics::Renderable2D::m_Texture |
|
protected |
The texture (if any) used by the renderable.
◆ m_UV
| std::vector<glm::vec2> fireworks::graphics::Renderable2D::m_UV |
|
mutableprotected |
The UV coordinates of the renderable.
◆ objectID
| std::uint32_t fireworks::graphics::Renderable2D::objectID |
The unique ID of the renderable object.
◆ shader
| Shader* fireworks::graphics::Renderable2D::shader |
The Shader used to draw the particular renderable.
- Note
- This shader is used only when using the graphics::InstanceRenderer2D Renderer, unlike for the graphics::BatchRenderer2D which used a global shader for all the renderables
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/fireworks-engine/checkouts/latest/Fireworks Engine/Fireworks Core/src/graphics/renderables/renderable2d.h
- /home/docs/checkouts/readthedocs.org/user_builds/fireworks-engine/checkouts/latest/Fireworks Engine/Fireworks Core/src/graphics/renderers/batchrenderer2d.cpp