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

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

#include <ShapeLineComponent.hpp>

Inheritance diagram for shkyera::ShapeLineComponent:
[legend]

Public Member Functions

void setX (float x)
 Set the X-coordinate of the line's displacement. More...
 
void setY (float y)
 Set the Y-coordinate of the line's displacement. More...
 
virtual void drawShape () override
 Draw the line 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 _x
 
float _y
 

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 lines within a game or application.

The ShapeLineComponent class is designed for rendering lines. It extends the ShapeComponent class and provides methods to set the size of the line and draw it.

Member Function Documentation

◆ drawShape()

void shkyera::ShapeLineComponent::drawShape ( )
overridevirtual

Draw the line shape.

This method is responsible for rendering the line shape using the provided renderer. Subclasses should implement this method to define the drawing behavior for the specific line shape.

Implements shkyera::ShapeComponent.

◆ setX()

void shkyera::ShapeLineComponent::setX ( float  x)

Set the X-coordinate of the line's displacement.

Parameters
xThe X-coordinate of the line's displacement.

◆ setY()

void shkyera::ShapeLineComponent::setY ( float  y)

Set the Y-coordinate of the line's displacement.

Parameters
yThe Y-coordinate of the line's displacement.

Member Data Documentation

◆ _x

float shkyera::ShapeLineComponent::_x
private

◆ _y

float shkyera::ShapeLineComponent::_y
private

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