|
| DataPlotEntity (const sf::Vector2f origin, const sf::Vector2f scale, const std::vector< sf::Vector2f > &dataPoints) |
| Constructs a DataPlotEntity with given origin, scale, and raw data points.
|
virtual | ~DataPlotEntity ()=default |
| Virtual destructor.
|
sf::Color | getColor () const |
| Get the current line color.
|
float | getThickness () |
| Get the line thickness in pixels.
|
wEngine::LineStyleComponent::LineStyle | getLineStyle () |
| Get the current line style.
|
float | getDashLength () |
| Get the dash length for dashed lines.
|
float | getGapLength () |
| Get the gap length for dashed/dotted lines.
|
void | setColor (sf::Color color) |
| Sets the color of the plotted line.
|
void | setThickness (float thickness) |
| Sets the line thickness in pixels.
|
void | setLineStyle (wEngine::LineStyleComponent::LineStyle style) |
| Sets the line style (Solid, Dashed, or Dotted).
|
void | setDashLength (float dashLength) |
| Sets the dash length for dashed lines.
|
void | setGapLength (float gapLength) |
| Sets the gap length between dashes or dots.
|
void | drawDataPlot (sf::RenderWindow &window) |
| Draws the connected data points to the window.
|
| Entity () |
virtual | ~Entity () |
unsigned int | getEntityID () const |
| Returns the unique ID associated with this entity.
|
void | clearComponents () |
| Removes all components currently attached to the entity.
|
template<typename T, typename... Args> |
std::shared_ptr< T > | addComponent (Args &&... args) |
| Adds a new component of type T to the entity.
|
template<typename T> |
void | removeComponent () |
| Removes the component of type T from the entity.
|
template<typename T> |
bool | hasComponent () const noexcept |
| Checks whether the entity has a component of type T.
|
template<typename T> |
std::shared_ptr< T > | getComponent () const |
| Retrieves the component of type T attached to the entity.
|
template<typename T> |
std::shared_ptr< T > | requireComponent (const std::string &context="") const |
| Retrieves the component of type T and throws if it's missing.
|
template<typename Interface> |
std::shared_ptr< Interface > | getInterfaceComponent () const |
| Returns the first component that implements the specified interface.
|
Entity for plotting raw data points as a connected polyline.
Stores a vector of raw (x,y) points and draws straight line segments between them. Each segment is rendered using the current line style (Solid, Dashed, Dotted), with configurable color, thickness, dash length, and gap length.
- Note
- Unlike FunctionEntity, this class does not evaluate a function — it directly uses the provided data points. The points are still transformed by the entity's origin and scale before rendering.
- Author
- Wilfried Koch
- Copyright
- © 2025 Wilfried Koch. All rights reserved.