CGAL 6.1.1 - 3D Isosurfacing

Loading...
Searching...
No Matches
List of all members | Public Member Functions
CGAL::Isosurfacing::Interpolated_discrete_gradients_3< Grid, InterpolationScheme > Class Template Reference
Reference Manual » Value and Gradient Fields

`#include <CGAL/Isosurfacing_3/Interpolated_discrete_gradients_3.h>`

## Definition

template<typename Grid, typename InterpolationScheme = Trilinear_interpolation<Grid>>
class CGAL::Isosurfacing::Interpolated_discrete_gradients_3< Grid, InterpolationScheme >

Class template for a gradient field that is computed using discrete values and interpolation.

Is model of
  `IsosurfacingValueField_3`

Template Parameters

  Grid | must be `CGAL::Isosurfacing::Cartesian_grid_3<GeomTraits>`, with `GeomTraits` a model of `IsosurfacingTraits_3`
  InterpolationScheme | must be a model of `IsosurfacingInterpolationScheme_3`

Examples
  Isosurfacing_3/contouring_discrete_data.cpp.

## Public Member Functions
| Interpolated_discrete_gradients_3 (const Grid &grid, const InterpolationScheme &interpolation=InterpolationScheme())
template<typename ValueField >
void | compute_discrete_gradients (const ValueField &values)
| computes (using finite difference) and stores gradients at all vertices of the grid.
Vector_3 & | operator() (const std::size_t i, const std::size_t j, const std::size_t k)
| returns the gradient stored at the grid vertex described by its three indices.
const Vector_3 & | operator() (const std::size_t i, const std::size_t j, const std::size_t k) const
| returns the gradient stored at the grid vertex described by a set of indices.
Vector_3 | operator() (const Point_3 &p) const
| returns the gradient at a given point `p`.

## Member Function Documentation

## ◆ compute_discrete_gradients()

template<typename Grid , typename InterpolationScheme = Trilinear_interpolation<Grid>>
template<typename ValueField >

void CGAL::Isosurfacing::Interpolated_discrete_gradients_3< Grid, InterpolationScheme >::compute_discrete_gradients | ( | const ValueField & | values | ) |

computes (using finite difference) and stores gradients at all vertices of the grid.

Template Parameters

  ValueField | must be a model of `IsosurfacingValueField_3`

Parameters

  values | a field of values whose gradient are being computed

## ◆ operator()() [1/2]

template<typename Grid , typename InterpolationScheme = Trilinear_interpolation<Grid>>

Vector_3 & CGAL::Isosurfacing::Interpolated_discrete_gradients_3< Grid, InterpolationScheme >::operator() | ( | const std::size_t | i,
|  | const std::size_t | j,
|  | const std::size_t | k
| ) |  |

returns the gradient stored at the grid vertex described by its three indices.

Note
  This function can be used to set the gradient at a grid vertex.

Parameters

  i | the index in the `x` direction
  j | the index in the `y` direction
  k | the index in the `z` direction

Precondition
  `i < xdim()` and `j < ydim()` and `k < zdim()`

## ◆ operator()() [2/2]

template<typename Grid , typename InterpolationScheme = Trilinear_interpolation<Grid>>

const Vector_3 & CGAL::Isosurfacing::Interpolated_discrete_gradients_3< Grid, InterpolationScheme >::operator() | ( | const std::size_t | i,
|  | const std::size_t | j,
|  | const std::size_t | k
| ) |  | const

returns the gradient stored at the grid vertex described by a set of indices.

Parameters

  i | the index in the `x` direction
  j | the index in the `y` direction
  k | the index in the `z` direction

Precondition
  `i < xdim()` and `j < ydim()` and `k < zdim()`