![]() |
wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
|
ECS component that defines the thickness of a drawable object. More...
#include <wThicknessComponent.hpp>
Public Member Functions | |
ThicknessComponent (float thickness=2.0f) | |
Constructs the component with an initial positive thickness. | |
virtual | ~ThicknessComponent ()=default |
float | getThickness () const |
Returns the current thickness. | |
void | setThickness (float newThickness) |
Sets a new thickness value. | |
void | debugPrint () const |
Outputs the current thickness 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 defines the thickness of a drawable object.
This component stores a positive float value representing the thickness (in pixels) of lines or shapes (e.g., axes, borders). The value must be strictly positive.
Examples:
std::invalid_argument | if the value is zero or negative. |
wEngine::ThicknessComponent::ThicknessComponent | ( | float | thickness = 2.0f | ) |
Constructs the component with an initial positive thickness.
thickness | Initial thickness value (default is 2.0f). |
std::invalid_argument | if the value is zero or negative. |
|
virtualdefault |
|
nodiscard |
Returns the current thickness.
void wEngine::ThicknessComponent::setThickness | ( | float | newThickness | ) |
Sets a new thickness value.
newThickness | A strictly positive float. |
std::invalid_argument | if the value is zero or negative. |
void wEngine::ThicknessComponent::debugPrint | ( | ) | const |
Outputs the current thickness value to the console for debugging.