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 | List of all members
lefer::FlowField Class Reference

#include <lefer.hpp>

Public Member Functions

 FlowField (double **flow_field, int field_width)
 
int get_field_width ()
 
int get_flow_field_col (double x)
 
int get_flow_field_row (double y)
 
bool off_boundaries (double x, double y)
 
double get_angle (double x, double y)
 

Constructor & Destructor Documentation

◆ FlowField()

lefer::FlowField::FlowField ( double **  flow_field,
int  field_width 
)

The constructor for FlowField class.

This constructor builds a wrapper object around a 2D grid of double values. i.e. a 2D array of double values. This 2D array of double values must be a heap-based (i.e. dinamically allocated) array.

Very important, this grid must be a square, meaning that, the height and width of the field must be the same.

Parameters
flowfieldthe 2D array of double values that defines the flow field.
field_widththe width of the field.

Member Function Documentation

◆ get_angle()

double lefer::FlowField::get_angle ( double  x,
double  y 
)

◆ get_field_width()

int lefer::FlowField::get_field_width ( )

◆ get_flow_field_col()

int lefer::FlowField::get_flow_field_col ( double  x)

◆ get_flow_field_row()

int lefer::FlowField::get_flow_field_row ( double  y)

◆ off_boundaries()

bool lefer::FlowField::off_boundaries ( double  x,
double  y 
)

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