CGAL::Stream_lines_2<VectorField_2,Integrator_2>

Definition

The class Stream_lines_2<VectorField_2,Integrator_2> is designed to handle a placement of streamlines in a 2D domain according to a bidimensional vector field.

The class Stream_lines_2<VectorField_2,Integrator_2> creates a placement of streamlines according to a specified density and gives access to those streamlines via two iterators over a container of iterators that provide access to the streamline points.

Parameters

The class Stream_lines_2<VectorField_2,Integrator_2> has two template parameters. The first parameter VectorField_2 has to be instantiated by a model of the concept VectorField_2. The second parameter is the function object Integrator_2, and has to be instantiated by a model of the concept Integrator_2.

Types

typedef VectorField_2::Geom_traits
Geom_traits; the traits class.
typedef VectorField_2::FT FT; the scalar type.
typedef VectorField_2::Point_2 Point_2; the point type.
typedef VectorField_2::Vector_2 Vector_2; the vector type.

The class Stream_lines_2<VectorField_2,Integrator_2> provides also two types for handling streamlines:

Stream_lines_2<VectorField_2,Integrator_2>::Point_iterator_2
iterator of points with value type Point_2.

Stream_lines_2<VectorField_2,Integrator_2>::Stream_line_iterator_2
an iterator to visit the streamlines with value type std::pair<Point_iterator_2, Point_iterator_2>.

Creation

Stream_lines_2<VectorField_2,Integrator_2> stl ( VectorField_2 vector_field_2,
Integrator_2 integrator_2,
FT separating_distance,
FT saturation_ratio);
Generates a streamline placement stl.

Modifiers

void stl.set_separating_distance ( FT new_value)
Modify the separating distance.
void stl.set_saturation_ratio ( FT new_value)
Modify the saturation ratio.
void stl.update () Update the placement after changing the separating distance or the saturation ratio.

Access Functions

void stl.get_separating_distance () returns the separating distance.
void stl.get_saturation_ratio () returns the saturation ratio.
void stl.print_stream_lines ( std::ofstream & fw)
prints the streamlines to an ASCII file : line by line, and point by point.

Streamline iterators

The following iterators allow to visit all the streamlines generated by the constructor or the update function.

Stream_line_iterator stl.begin () const Starts at the first streamline
Stream_line_iterator stl.end () const Past-the-end iterator