8#ifndef W_DATA_PLOT_ENTITY_HPP
9#define W_DATA_PLOT_ENTITY_HPP
13#pragma GCC diagnostic push
14#pragma GCC diagnostic ignored "-Wfloat-equal"
15#pragma GCC diagnostic ignored "-Wswitch-default"
16#include <SFML/System/Vector2.hpp>
17#include <SFML/Graphics.hpp>
18#pragma GCC diagnostic pop
51 DataPlotEntity(
const sf::Vector2f origin,
const sf::Vector2f scale,
const std::vector< sf::Vector2f >& dataPoints );
62 [[nodiscard]] sf::Color
getColor( )
const;
131 std::vector< sf::Vector2f > mDataPoints;
Represents an entity in the ECS (Entity-Component System) architecture.
Definition wEntity.hpp:60
LineStyle
Available styles for line rendering.
Definition wLineStyleComponent.hpp:35
float getThickness()
Get the line thickness in pixels.
Definition wDataPlotEntity.cpp:46
void drawDataPlot(sf::RenderWindow &window)
Draws the connected data points to the window.
Definition wDataPlotEntity.cpp:106
virtual ~DataPlotEntity()=default
Virtual destructor.
void setGapLength(float gapLength)
Sets the gap length between dashes or dots.
Definition wDataPlotEntity.cpp:94
wEngine::LineStyleComponent::LineStyle getLineStyle()
Get the current line style.
Definition wDataPlotEntity.cpp:52
void setDashLength(float dashLength)
Sets the dash length for dashed lines.
Definition wDataPlotEntity.cpp:88
float getDashLength()
Get the dash length for dashed lines.
Definition wDataPlotEntity.cpp:58
float getGapLength()
Get the gap length for dashed/dotted lines.
Definition wDataPlotEntity.cpp:64
sf::Color getColor() const
Get the current line color.
Definition wDataPlotEntity.cpp:40
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.
Definition wDataPlotEntity.cpp:24
void setLineStyle(wEngine::LineStyleComponent::LineStyle style)
Sets the line style (Solid, Dashed, or Dotted).
Definition wDataPlotEntity.cpp:82
void setThickness(float thickness)
Sets the line thickness in pixels.
Definition wDataPlotEntity.cpp:76
void setColor(sf::Color color)
Sets the color of the plotted line.
Definition wDataPlotEntity.cpp:70
Definition wAxisEntity.cpp:17