#include <Core/Containers/Tex.hpp>
Public Types | |
using | IdxVector = typename Grid<T, N>::IdxVector |
using | Vector = Eigen::Matrix<Scalar, N, 1> |
using | AabbND = Eigen::AlignedBox<Scalar, N> |
![]() | |
using | IdxVector |
Dimension of our grid. | |
using | OffsetVector |
A vector of the size of the grid along each dimension. | |
Public Member Functions | |
Tex (const IdxVector &resolution, const Vector &start, const Vector &end) | |
Construct a Tex with the given resolution in the box given by two points. | |
Tex (const IdxVector &resolution, const AabbND &aabb) | |
Construct a Tex with the give resulution in the given AABB. | |
Tex (const Tex &other)=default | |
Copy constructor and assignment operator perform a deep copy. | |
Tex & | operator= (const Tex &other)=default |
const AabbND & | getAabb () const |
T | fetch (const Vector &v) const |
Tri-linear interpolation of the grid values at position v. | |
![]() | |
Grid (const IdxVector &size=IdxVector::Zero(), const T &val=T()) | |
Construct a grid of a given size and fill it with the given value. | |
Grid (const IdxVector &size, const T *values) | |
Construct a grid of a given size with values in ()-major format. | |
Grid (const Grid< T, D > &other)=default | |
Copy constructor and assignment operator. | |
Grid & | operator= (const Grid< T, D > &other)=default |
uint | size () const |
Returns the number of elements stored. | |
const IdxVector & | sizeVector () const |
Returns the size vector (a D-dimensional vector with the size along each dimension). | |
bool | empty () const |
Returns true if the grid is empty (i.e. if size() ==0). | |
void | clear () |
Erases all data and makes the grid empty. | |
const T & | at (const IdxVector &idx) const |
Access an element with a D-dimensional index. | |
T & | at (const IdxVector &idx) |
const T & | at (uint idx) const |
Access an element with a linear index. | |
T & | at (uint idx) |
const T & | at (const Iterator &it) const |
Access an element with an iterator. | |
T & | at (const Iterator &it) |
const T * | data () const |
Read only access to the underlying data. | |
T * | data () |
Read-write access to the underlying data. | |
Iterator | begin () |
Get an iterator on this grid at the first element. | |
Iterator | begin () const |
Iterator | end () |
Get an iterator on this grid past the last element. | |
Iterator | end () const |
Additional Inherited Members | |
![]() | |
static const uint | Dimension |
![]() | |
IdxVector | m_size |
Indicate the extends of the grid along each dimension. | |
std::vector< T > | m_data |
Storage for the grid data. | |
This class stores a discretized N-D function defined inside a N-D bounding box. It evaluates the function at a given point in space wrt the stored values N-linear interpolation.
using Ra::Core::Tex< T, N >::AabbND = Eigen::AlignedBox<Scalar, N> |
using Ra::Core::Tex< T, N >::IdxVector = typename Grid<T, N>::IdxVector |
using Ra::Core::Tex< T, N >::Vector = Eigen::Matrix<Scalar, N, 1> |
Ra::Core::Tex< T, N >::Tex | ( | const IdxVector & | resolution, |
const Vector & | start, | ||
const Vector & | end ) |
Ra::Core::Tex< T, N >::Tex | ( | const IdxVector & | resolution, |
const AabbND & | aabb ) |
|
inline |
|
inline |