Shkyera Engine
Easy to use, game engine for Python
|
A specialized shape component for rendering circles within a game or application. More...
#include <ShapeCircleComponent.hpp>
Public Member Functions | |
void | setRadius (float r) |
Set the radius of the circle. More... | |
virtual void | drawShape () override |
Draw the circle shape. More... | |
Public Member Functions inherited from shkyera::ShapeComponent | |
void | setRenderer (std::shared_ptr< Renderer > renderer) |
Set the renderer for this shape component. More... | |
Component (std::shared_ptr< GameObject > object) | |
Constructor for ShapeComponent. More... | |
Public Member Functions inherited from shkyera::Component | |
Component (std::shared_ptr< GameObject > object) | |
Constructor to initialize a component with a shared pointer to a game object. More... | |
std::shared_ptr< GameObject > | getObject () |
Get the shared pointer to the game object to which this component is attached. More... | |
Private Attributes | |
float | _radius |
Additional Inherited Members | |
Static Public Member Functions inherited from shkyera::ShapeComponent | |
static void | addShape (std::shared_ptr< ShapeComponent > shape) |
Add a shape component to the list of managed shapes. More... | |
static void | removeShape (std::shared_ptr< ShapeComponent > shape) |
Remove a shape component from the list of managed shapes. More... | |
static std::vector< std::shared_ptr< ShapeComponent > > | getShapes () |
Get the list of managed shape components. More... | |
Protected Attributes inherited from shkyera::ShapeComponent | |
std::shared_ptr< Renderer > | _renderer |
Protected Attributes inherited from shkyera::Component | |
std::shared_ptr< GameObject > | _object |
The game object to which this component is attached. More... | |
A specialized shape component for rendering circles within a game or application.
The ShapeCircleComponent class is designed for rendering circle shapes. It extends the ShapeComponent class and provides methods to set the radius of the circle and to draw it.
|
overridevirtual |
Draw the circle shape.
This method is responsible for rendering the circle shape using the provided renderer. Subclasses should implement this method to define the drawing behavior for the specific circle shape.
Implements shkyera::ShapeComponent.
void shkyera::ShapeCircleComponent::setRadius | ( | float | r | ) |
Set the radius of the circle.
r | The radius of the circle. |
|
private |