wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
Loading...
Searching...
No Matches
wRotationComponent.hpp
Go to the documentation of this file.
1/*
2+---------------------------------------------------------------------------------------------------------------------------------------------------+
3Created by Wilfried Koch.
4Copyright @ 2025 Wilfried Koch. All rights reserved.
5+---------------------------------------------------------------------------------------------------------------------------------------------------+
6*/
7
8#ifndef W_ROTATION_COMPONENT_HPP
9#define W_ROTATION_COMPONENT_HPP
10
12
13namespace wEngine
14{
15
34 {
35 public:
40 RotationComponent( float angle = 0.0f );
41
42 /*
43 * @brief Virtual destructor.
44 */
45 virtual ~RotationComponent( ) = default;
46
51 void setAngle( float angle );
52
57 [[nodiscard]] float getAngle( ) const;
58
62 void debugPrint( ) const;
63
64 private:
65 float mAngle;
66 };
67
68}//End of namespace wEngine
69
70#endif
Component()
Protected constructor to restrict instantiation to derived classes.
Definition wComponent.cpp:17
void setAngle(float angle)
Set the rotation angle.
Definition wRotationComponent.cpp:29
RotationComponent(float angle=0.0f)
Construct a RotationComponent with an initial angle.
Definition wRotationComponent.cpp:17
void debugPrint() const
Outputs the current angle value to the console for debugging.
Definition wRotationComponent.cpp:45
virtual ~RotationComponent()=default
float getAngle() const
Get the current rotation angle.
Definition wRotationComponent.cpp:34
Definition wColorComponent.cpp:9