\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.8 - 2D Placement of Streamlines

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members | Public Member Functions
CGAL::Stream_lines_2< VectorField_2, Integrator_2 > Class Template Reference
2D Placement of Streamlines Reference

`#include <CGAL/Stream_lines_2.h>`

## Definition

The class `Stream_lines_2` generates a placement of streamlines in a 2D domain according to a bidimensional vector field.

The class places streamlines according to a specified density and gives access to the generated streamlines via two iterators over a container of iterators that provide access to the streamline points.

Template Parameters

  VectorField_2 | must be a model of the concept `VectorField_2`.
  Integrator_2 | is a function object and must be a model of the concept `Integrator_2`.

Examples:
  Stream_lines_2/stl_regular_field.cpp, and Stream_lines_2/stl_triangular_field.cpp.

## Public Member Functions
| Stream_lines_2 (VectorField_2 vector_field_2, Integrator_2 integrator_2, FT separating_distance, FT saturation_ratio)
| Constructor which generates a streamline placement.

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

## Streamline Iterators
typedef unspecified_type | Point_iterator_2
| iterator of points with value type `Point_2`.
typedef unspecified_type | Stream_line_iterator_2
| an iterator to visit the streamlines with value type `std::pair<Point_iterator_2, Point_iterator_2>`.
Stream_line_iterator | begin () const
| Starts at the first streamline.
Stream_line_iterator | end () const
| Past-the-end iterator.

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

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