Shkyera Engine
Easy to use, game engine for Python
shkyera::ShapeCircleComponent Class Referencefinal

A specialized shape component for rendering circles within a game or application. More...

#include <ShapeCircleComponent.hpp>

Inheritance diagram for shkyera::ShapeCircleComponent:
[legend]

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< GameObjectgetObject ()
 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...
 

Detailed Description

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.

Member Function Documentation

◆ drawShape()

void shkyera::ShapeCircleComponent::drawShape ( )
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.

◆ setRadius()

void shkyera::ShapeCircleComponent::setRadius ( float  r)

Set the radius of the circle.

Parameters
rThe radius of the circle.

Member Data Documentation

◆ _radius

float shkyera::ShapeCircleComponent::_radius
private

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