lefer
0.1.0
A C++ library to draw evenly-spaced and non-overlapping curves in a flow field using the Jobard and Lefer (1997) algorithm.
|
#include <lefer.hpp>
Public Member Functions | |
Curve (int id, int n_steps) | |
void | insert_step (double x_coord, double y_coord, int direction_id) |
Public Attributes | |
int | _curve_id |
std::vector< double > | _x |
std::vector< double > | _y |
std::vector< int > | _direction |
std::vector< int > | _step_id |
int | _steps_taken |
A class that represents a curve
lefer::Curve::Curve | ( | int | id, |
int | n_steps | ||
) |
The number of steps taken to draw the curve.
The constructor for a Curve object
This constructor returns a empty Curve object, that you can use to store the coordinates and information about a specific curve you want to drawn into the field.
id | the id you want to give to this Curve object. |
n_steps | the number of steps you will use to draw this curve. |
void lefer::Curve::insert_step | ( | double | x_coord, |
double | y_coord, | ||
int | direction_id | ||
) |
int lefer::Curve::_curve_id |
The id that identifies the curve
std::vector<int> lefer::Curve::_direction |
The y coordinates of each point in the curve
std::vector<int> lefer::Curve::_step_id |
The direction id of each point in the curve (0 means direction from left to right, 1 means direction from right to left)
int lefer::Curve::_steps_taken |
The id (or the number) of the step for each point in the curve
std::vector<double> lefer::Curve::_x |
std::vector<double> lefer::Curve::_y |
The x coordinates of each point in the curve