Jet  v1.3.3
Public Member Functions | List of all members
jet::NearestArraySampler< T, R, 3 > Class Template Referencefinal

3-D nearest array sampler class. More...

#include <jet/array_samplers3.h>

Public Member Functions

 NearestArraySampler (const ConstArrayAccessor3< T > &accessor, const Vector3< R > &gridSpacing, const Vector3< R > &gridOrigin)
 Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element. More...
 
 NearestArraySampler (const NearestArraySampler &other)
 Copy constructor. More...
 
operator() (const Vector3< R > &pt) const
 Returns sampled value at point pt. More...
 
void getCoordinate (const Vector3< R > &pt, Point3UI *index) const
 Returns the nearest array index for point x. More...
 
std::function< T(const Vector3< R > &)> functor () const
 Returns a funtion object that wraps this instance. More...
 

Detailed Description

template<typename T, typename R>
class jet::NearestArraySampler< T, R, 3 >

3-D nearest array sampler class.

This class provides nearest sampling interface for a given 3-D array.

Template Parameters
T- The value type to sample.
R- The real number type.

Constructor & Destructor Documentation

◆ NearestArraySampler() [1/2]

template<typename T , typename R >
jet::NearestArraySampler< T, R, 3 >::NearestArraySampler ( const ConstArrayAccessor3< T > &  accessor,
const Vector3< R > &  gridSpacing,
const Vector3< R > &  gridOrigin 
)
explicit

Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element.

Parameters
[in]accessorThe array accessor.
[in]gridSpacingThe grid spacing.
[in]gridOriginThe grid origin.

◆ NearestArraySampler() [2/2]

template<typename T , typename R >
jet::NearestArraySampler< T, R, 3 >::NearestArraySampler ( const NearestArraySampler< T, R, 3 > &  other)

Copy constructor.

Member Function Documentation

◆ functor()

template<typename T , typename R >
std::function<T(const Vector3<R>&)> jet::NearestArraySampler< T, R, 3 >::functor ( ) const

Returns a funtion object that wraps this instance.

◆ getCoordinate()

template<typename T , typename R >
void jet::NearestArraySampler< T, R, 3 >::getCoordinate ( const Vector3< R > &  pt,
Point3UI index 
) const

Returns the nearest array index for point x.

◆ operator()()

template<typename T , typename R >
T jet::NearestArraySampler< T, R, 3 >::operator() ( const Vector3< R > &  pt) const

Returns sampled value at point pt.


The documentation for this class was generated from the following file: