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.
Public Member Functions | Public Attributes | List of all members
lefer::Curve Class Reference

#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
 

Detailed Description

A class that represents a curve

Constructor & Destructor Documentation

◆ 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.

Parameters
idthe id you want to give to this Curve object.
n_stepsthe number of steps you will use to draw this curve.

Member Function Documentation

◆ insert_step()

void lefer::Curve::insert_step ( double  x_coord,
double  y_coord,
int  direction_id 
)

Member Data Documentation

◆ _curve_id

int lefer::Curve::_curve_id

The id that identifies the curve

◆ _direction

std::vector<int> lefer::Curve::_direction

The y coordinates of each point in the curve

◆ _step_id

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)

◆ _steps_taken

int lefer::Curve::_steps_taken

The id (or the number) of the step for each point in the curve

◆ _x

std::vector<double> lefer::Curve::_x

◆ _y

std::vector<double> lefer::Curve::_y

The x coordinates of each point in the curve


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