A specialized shape component for rendering rectangles within a game or application.
More...
#include <ShapeRectangleComponent.hpp>
A specialized shape component for rendering rectangles within a game or application.
The ShapeRectangleComponent class is designed for rendering rectangle shapes. It extends the ShapeComponent class and provides methods to set the dimensions and color of the rectangle and to draw it.
◆ drawShape()
void shkyera::ShapeRectangleComponent::drawShape |
( |
| ) |
|
|
overridevirtual |
Draw the rectangle shape.
This method is responsible for rendering the rectangle shape using the provided renderer. Subclasses should implement this method to define the drawing behavior for the specific rectangle shape.
Implements shkyera::ShapeComponent.
◆ setColor()
void shkyera::ShapeRectangleComponent::setColor |
( |
glm::vec3 |
color | ) |
|
Set the color of the rectangle.
- Parameters
-
color | A glm::vec3 representing the color of the rectangle. |
◆ setHeight()
void shkyera::ShapeRectangleComponent::setHeight |
( |
float |
h | ) |
|
Set the height of the rectangle.
- Parameters
-
h | The height of the rectangle. |
◆ setWidth()
void shkyera::ShapeRectangleComponent::setWidth |
( |
float |
w | ) |
|
Set the width of the rectangle.
- Parameters
-
w | The width of the rectangle. |
◆ _color
glm::vec3 shkyera::ShapeRectangleComponent::_color |
|
private |
◆ _height
float shkyera::ShapeRectangleComponent::_height |
|
private |
◆ _width
float shkyera::ShapeRectangleComponent::_width |
|
private |
The documentation for this class was generated from the following files: