\( \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::Regular_grid_2< StreamLinesTraits_2 > Class Template Reference

#include <CGAL/Regular_grid_2.h>

Definition

This class provides a 2D vector field specified by a set of sample points defined on a regular grid, with a bilinear interpolation scheme over its cells (i.e. for each point p in a cell c, the vector value is interpolated from the vertices of c).

Template Parameters
StreamLinesTraits_2has to instantiated by a model of the concept StreamLinesTraits_2.
Is Model Of:
VectorField_2
See also
Triangular_field_2<StreamLinesTraits_2>
Examples:
Stream_lines_2/stl_regular_field.cpp.

Types

typedef StreamLinesTraits_2::FT FT
 the scalar type. More...
 
typedef
StreamLinesTraits_2::Point_2 
Point_2
 the point type. More...
 
typedef
StreamLinesTraits_2::Vector_2 
Vector_2
 the vector type. More...
 

Creation

 Regular_grid_2 (int x_samples, int y_samples, FT x_size, FT y_size)
 Generate a regular grid whose size is x_size by y_size, while x_samples and y_samples specify the number of samples on x and y. More...
 

Modifiers

In addition to the minimum interface required by the concept definition, the class Regular_grid_2 provides the following function to fill the vector field with the user data.

void set_xy (int i, int j, Vector_2 v)
 Attribute the vector v to the position (i,j) on the regular grid. More...
 

Access Functions

std::pair< int, int > get_dimension ()
 returns the dimension of the grid. More...
 
std::pair< FT, FTget_size ()
 returns the size of the grid. More...
 

Member Typedef Documentation

template<typename StreamLinesTraits_2 >
typedef StreamLinesTraits_2::FT CGAL::Regular_grid_2< StreamLinesTraits_2 >::FT

the scalar type.

template<typename StreamLinesTraits_2 >
typedef StreamLinesTraits_2::Point_2 CGAL::Regular_grid_2< StreamLinesTraits_2 >::Point_2

the point type.

template<typename StreamLinesTraits_2 >
typedef StreamLinesTraits_2::Vector_2 CGAL::Regular_grid_2< StreamLinesTraits_2 >::Vector_2

the vector type.

Constructor & Destructor Documentation

template<typename StreamLinesTraits_2 >
CGAL::Regular_grid_2< StreamLinesTraits_2 >::Regular_grid_2 ( int  x_samples,
int  y_samples,
FT  x_size,
FT  y_size 
)

Generate a regular grid whose size is x_size by y_size, while x_samples and y_samples specify the number of samples on x and y.

Member Function Documentation

template<typename StreamLinesTraits_2 >
std::pair<int, int> CGAL::Regular_grid_2< StreamLinesTraits_2 >::get_dimension ( )

returns the dimension of the grid.

template<typename StreamLinesTraits_2 >
std::pair<FT, FT> CGAL::Regular_grid_2< StreamLinesTraits_2 >::get_size ( )

returns the size of the grid.

template<typename StreamLinesTraits_2 >
void CGAL::Regular_grid_2< StreamLinesTraits_2 >::set_xy ( int  i,
int  j,
Vector_2  v 
)

Attribute the vector v to the position (i,j) on the regular grid.