wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
Loading...
Searching...
No Matches
wEngine::NotchIntervalComponent Class Reference

ECS component that defines the interval between notches on an axis. More...

#include <wNotchIntervalComponent.hpp>

Inheritance diagram for wEngine::NotchIntervalComponent:
Inheritance graph

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.
EntitygetParent () 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.

Detailed Description

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.

Author
Wilfried Koch

Constructor & Destructor Documentation

◆ NotchIntervalComponent()

wEngine::NotchIntervalComponent::NotchIntervalComponent ( float interval = 1.0f)

Constructs a NotchIntervalComponent with a given interval.

Parameters
intervalDistance between notches in logical units (must be > 0). Default is 1.0f.
Exceptions
std::invalid_argumentif interval is not strictly positive.

◆ ~NotchIntervalComponent()

virtual wEngine::NotchIntervalComponent::~NotchIntervalComponent ( )
virtualdefault

Member Function Documentation

◆ getInterval()

float wEngine::NotchIntervalComponent::getInterval ( ) const
nodiscard

Returns the current spacing between notches.

Returns
The interval, expressed in logical units.

◆ setInterval()

void wEngine::NotchIntervalComponent::setInterval ( float newInterval)

Sets a new interval between notches.

Parameters
newIntervalNew spacing value (must be > 0).
Exceptions
std::invalid_argumentif newInterval is not strictly positive.

◆ debugPrint()

void wEngine::NotchIntervalComponent::debugPrint ( ) const

Outputs the current interval to standard output for debugging.


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