\( \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.7 - 2D Placement of Streamlines
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Stream_lines_2< VectorField_2, Integrator_2 > Class Template 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_2must be a model of the concept VectorField_2.
Integrator_2is 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. More...
 

Types

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

Streamline Iterators

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

Modifiers

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

Access Functions

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

Member Typedef Documentation

template<typename VectorField_2 , typename Integrator_2 >
typedef VectorField_2::FT CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::FT

the scalar type.

template<typename VectorField_2 , typename Integrator_2 >
typedef VectorField_2::Geom_traits CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::Geom_traits

the traits class.

template<typename VectorField_2 , typename Integrator_2 >
typedef VectorField_2::Point_2 CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::Point_2

the point type.

template<typename VectorField_2 , typename Integrator_2 >
typedef unspecified_type CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::Point_iterator_2

iterator of points with value type Point_2.

template<typename VectorField_2 , typename Integrator_2 >
typedef unspecified_type CGAL::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>.

template<typename VectorField_2 , typename Integrator_2 >
typedef VectorField_2::Vector_2 CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::Vector_2

the vector type.

Constructor & Destructor Documentation

template<typename VectorField_2 , typename Integrator_2 >
CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::Stream_lines_2 ( VectorField_2  vector_field_2,
Integrator_2  integrator_2,
FT  separating_distance,
FT  saturation_ratio 
)

Constructor which generates a streamline placement.

Member Function Documentation

template<typename VectorField_2 , typename Integrator_2 >
Stream_line_iterator CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::begin ( ) const

Starts at the first streamline.

template<typename VectorField_2 , typename Integrator_2 >
Stream_line_iterator CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::end ( ) const

Past-the-end iterator.

template<typename VectorField_2 , typename Integrator_2 >
FT CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::get_saturation_ratio ( ) const

returns the saturation ratio.

template<typename VectorField_2 , typename Integrator_2 >
FT CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::get_separating_distance ( ) const

returns the separating distance.

template<typename VectorField_2 , typename Integrator_2 >
void CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::print_stream_lines ( std::ofstream &  fw)

prints the streamlines to an ASCII file: line by line, and point by point.

template<typename VectorField_2 , typename Integrator_2 >
void CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::set_saturation_ratio ( FT  new_value)

Modify the saturation ratio.

template<typename VectorField_2 , typename Integrator_2 >
void CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::set_separating_distance ( FT  new_value)

Modify the separating distance.

template<typename VectorField_2 , typename Integrator_2 >
void CGAL::Stream_lines_2< VectorField_2, Integrator_2 >::update ( )

Update the placement after changing the separating distance or the saturation ratio.