![]() |
wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
|
ECS component that stores a rotation angle (in degrees). More...
#include <wRotationComponent.hpp>
Public Member Functions | |
RotationComponent (float angle=0.0f) | |
Construct a RotationComponent with an initial angle. | |
virtual | ~RotationComponent ()=default |
void | setAngle (float angle) |
Set the rotation angle. | |
float | getAngle () const |
Get the current rotation angle. | |
void | debugPrint () const |
Outputs the current angle value to the console for debugging. | |
Public Member Functions inherited from wEngine::Component | |
virtual | ~Component ()=default |
virtual void | enable () |
virtual void | disable () |
bool | isEnabled () const |
Checks whether the component is currently active. | |
void | setParent (Entity *parent) |
Sets the parent entity of this component. | |
Entity * | getParent () const |
Returns the parent entity of this component. |
Additional Inherited Members | |
Protected Member Functions inherited from wEngine::Component | |
Component () | |
Protected constructor to restrict instantiation to derived classes. |
ECS component that stores a rotation angle (in degrees).
This component can be attached to any entity that needs to be rotated relative to its logical origin. The angle is expressed in degrees (positive values correspond to counter-clockwise rotation).
wEngine::RotationComponent::RotationComponent | ( | float | angle = 0.0f | ) |
Construct a RotationComponent with an initial angle.
angle | Initial rotation angle in degrees (default: 0.0f). |
|
virtualdefault |
void wEngine::RotationComponent::setAngle | ( | float | angle | ) |
Set the rotation angle.
angle | New rotation angle in degrees. |
|
nodiscard |
Get the current rotation angle.
void wEngine::RotationComponent::debugPrint | ( | ) | const |
Outputs the current angle value to the console for debugging.