![]() |
wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
|
ECS component that defines the interval between notches on an axis. More...
#include <wNotchIntervalComponent.hpp>
Public Member Functions | |
NotchIntervalComponent (float interval=1.0f) | |
Constructs a NotchIntervalComponent with a given interval. | |
virtual | ~NotchIntervalComponent ()=default |
float | getInterval () const |
Returns the current spacing between notches. | |
void | setInterval (float newInterval) |
Sets a new interval between notches. | |
void | debugPrint () const |
Outputs the current interval to standard output 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 interval between notches on an axis.
This component stores the spacing (in logical units) between visual ticks or markers on an axis, such as those used in coordinate grids or charts.
It enables the placement of regular visual markers and may be queried by rendering systems.
wEngine::NotchIntervalComponent::NotchIntervalComponent | ( | float | interval = 1.0f | ) |
Constructs a NotchIntervalComponent with a given interval.
interval | Distance between notches in logical units (must be > 0). Default is 1.0f. |
std::invalid_argument | if interval is not strictly positive. |
|
virtualdefault |
|
nodiscard |
Returns the current spacing between notches.
void wEngine::NotchIntervalComponent::setInterval | ( | float | newInterval | ) |
Sets a new interval between notches.
newInterval | New spacing value (must be > 0). |
std::invalid_argument | if newInterval is not strictly positive. |
void wEngine::NotchIntervalComponent::debugPrint | ( | ) | const |
Outputs the current interval to standard output for debugging.