plot function in a given range and level of sampling.
More...
#include <Plotter.h>
|
| void | setSample (const uint32_t sample) |
| | set points to sample function, default is 50 points.
|
| void | unsetBound () |
| | unset bound size of the plot
|
| void | setBound (const sf::Vector2f &plotBound) |
| | set bound in which the function will be drawn
|
| void | setBorderTick (const uint32_t count) |
| | set border rendering for bounded plot
|
| void | setBorderWidth (const float thickness) |
| | set border widtj
|
| void | setBorderColor (const sf::Color &color) |
| | set color of the border
|
| void | clear () |
| | clear all plotted function
|
| void | plot (const std::function< float(float)> &slope, const sf::Vector2f &position, const sf::Color &lineColor, const float thickness=1.f) |
| | plot a function y = f(x)
|
| void | plot (const std::function< sf::Vector2f(float)> &slope, const sf::Vector2f &position, const sf::Color &lineColor, const float thickness=1.f) |
| | plot a parametric function (x, y) = f(t)
|
| void | plot (const std::vector< sf::Vector2f > &points, const sf::Vector2f &position, const sf::Color &lineColor, const float thickness) |
| | plot a set of point
|
plot function in a given range and level of sampling.
◆ clear()
| void sgui::Plotter::clear |
( |
| ) |
|
clear all plotted function
◆ plot() [1/3]
| void sgui::Plotter::plot |
( |
const std::function< float(float)> & | slope, |
|
|
const sf::Vector2f & | position, |
|
|
const sf::Color & | lineColor, |
|
|
const float | thickness = 1.f ) |
plot a function y = f(x)
- Parameters
-
| slope | is a lambda of the form y = f(x) |
| position | is the position of the plot |
| lineColor | set the color of the line |
| thickness | set the thickness of the line |
◆ plot() [2/3]
| void sgui::Plotter::plot |
( |
const std::function< sf::Vector2f(float)> & | slope, |
|
|
const sf::Vector2f & | position, |
|
|
const sf::Color & | lineColor, |
|
|
const float | thickness = 1.f ) |
plot a parametric function (x, y) = f(t)
- Parameters
-
| slope | is a lambda of the form (x, y) = f(t) |
| position | is the position of the plot |
| lineColor | set the color of the line |
| thickness | set the thickness of the line |
◆ plot() [3/3]
| void sgui::Plotter::plot |
( |
const std::vector< sf::Vector2f > & | points, |
|
|
const sf::Vector2f & | position, |
|
|
const sf::Color & | lineColor, |
|
|
const float | thickness ) |
plot a set of point
- Parameters
-
| points | is the set of point to be drawn |
| position | is the position of the plot |
| lineColor | set the color of the line/dot |
| thickness | set the thickness of the line/dot |
◆ setBorderColor()
| void sgui::Plotter::setBorderColor |
( |
const sf::Color & | color | ) |
|
set color of the border
- Parameters
-
◆ setBorderTick()
| void sgui::Plotter::setBorderTick |
( |
const uint32_t | count | ) |
|
set border rendering for bounded plot
- Parameters
-
| count | is the number of subdivision for abscissa and ordinate |
◆ setBorderWidth()
| void sgui::Plotter::setBorderWidth |
( |
const float | thickness | ) |
|
set border widtj
- Parameters
-
◆ setBound()
| void sgui::Plotter::setBound |
( |
const sf::Vector2f & | plotBound | ) |
|
set bound in which the function will be drawn
◆ setSample()
| void sgui::Plotter::setSample |
( |
const uint32_t | sample | ) |
|
set points to sample function, default is 50 points.
- Parameters
-
| sample | is the number of points used to sample curve. |
◆ unsetBound()
| void sgui::Plotter::unsetBound |
( |
| ) |
|
unset bound size of the plot
◆ render
◆ xRange
◆ yRange
The documentation for this class was generated from the following files: