HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::Map Struct Reference

Defines an affine transform and its inverse represented as a 3x3 matrix and a vec3 translation. More...

#include <NanoVDB.h>

Public Member Functions

__hostdev__ Map ()
 Default constructor for the identity map. More...
 
__hostdev__ Map (double s, const Vec3d &t=Vec3d(0.0, 0.0, 0.0))
 
template<typename MatT , typename Vec3T >
void set (const MatT &mat, const MatT &invMat, const Vec3T &translate, double taper=1.0)
 Initialize the member data from 3x3 or 4x4 matrices. More...
 
template<typename Mat4T >
void set (const Mat4T &mat, const Mat4T &invMat, double taper=1.0)
 Initialize the member data from 4x4 matrices. More...
 
template<typename Vec3T >
void set (double scale, const Vec3T &translation, double taper=1.0)
 
template<typename Vec3T >
__hostdev__ Vec3T applyMap (const Vec3T &ijk) const
 Apply the forward affine transformation to a vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyMapF (const Vec3T &ijk) const
 Apply the forward affine transformation to a vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyJacobian (const Vec3T &ijk) const
 Apply the linear forward 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. scale and rotation WITHOUT translation. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyJacobianF (const Vec3T &ijk) const
 Apply the linear forward 3x3 transformation to an input 3d vector using 32bit floating point arithmetics, e.g. scale and rotation WITHOUT translation. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyInverseMap (const Vec3T &xyz) const
 Apply the inverse affine mapping to a vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyInverseMapF (const Vec3T &xyz) const
 Apply the inverse affine mapping to a vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyInverseJacobian (const Vec3T &xyz) const
 Apply the linear inverse 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyInverseJacobianF (const Vec3T &xyz) const
 Apply the linear inverse 3x3 transformation to an input 3d vector using 32bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyIJT (const Vec3T &xyz) const
 Apply the transposed inverse 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation. More...
 
template<typename Vec3T >
__hostdev__ Vec3T applyIJTF (const Vec3T &xyz) const
 
__hostdev__ Vec3d getVoxelSize () const
 Return a voxels size in each coordinate direction, measured at the origin. More...
 

Public Attributes

float mMatF [9]
 
float mInvMatF [9]
 
float mVecF [3]
 
float mTaperF
 
double mMatD [9]
 
double mInvMatD [9]
 
double mVecD [3]
 
double mTaperD
 

Detailed Description

Defines an affine transform and its inverse represented as a 3x3 matrix and a vec3 translation.

Definition at line 3139 of file NanoVDB.h.

Constructor & Destructor Documentation

__hostdev__ nanovdb::Map::Map ( )
inline

Default constructor for the identity map.

Definition at line 3151 of file NanoVDB.h.

__hostdev__ nanovdb::Map::Map ( double  s,
const Vec3d t = Vec3d(0.0, 0.0, 0.0) 
)
inline

Definition at line 3162 of file NanoVDB.h.

Member Function Documentation

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyIJT ( const Vec3T &  xyz) const
inline

Apply the transposed inverse 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation.

Note
Typically this operation is used for scale and rotation from world -> index mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
linear inverse 3x3 mapping of the input vector i.e. xyz x mat^-1

Definition at line 3269 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyIJTF ( const Vec3T &  xyz) const
inline

Definition at line 3271 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyInverseJacobian ( const Vec3T &  xyz) const
inline

Apply the linear inverse 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation.

Note
Typically this operation is used for scale and rotation from world -> index mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
linear inverse 3x3 mapping of the input vector i.e. xyz x mat^-1

Definition at line 3251 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyInverseJacobianF ( const Vec3T &  xyz) const
inline

Apply the linear inverse 3x3 transformation to an input 3d vector using 32bit floating point arithmetics, e.g. inverse scale and inverse rotation WITHOUT translation.

Note
Typically this operation is used for scale and rotation from world -> index mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
linear inverse 3x3 mapping of the input vector i.e. xyz x mat^-1

Definition at line 3260 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyInverseMap ( const Vec3T &  xyz) const
inline

Apply the inverse affine mapping to a vector using 64bit floating point arithmetics.

Note
Typically this operation is used for the world -> index mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
xyz3D vector to be mapped - typically floating point world coordinates
Returns
Inverse affine mapping of the input xyz i.e. (xyz - translation) x mat^-1

Definition at line 3228 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyInverseMapF ( const Vec3T &  xyz) const
inline

Apply the inverse affine mapping to a vector using 32bit floating point arithmetics.

Note
Typically this operation is used for the world -> index mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
xyz3D vector to be mapped - typically floating point world coordinates
Returns
Inverse affine mapping of the input xyz i.e. (xyz - translation) x mat^-1

Definition at line 3239 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyJacobian ( const Vec3T &  ijk) const
inline

Apply the linear forward 3x3 transformation to an input 3d vector using 64bit floating point arithmetics, e.g. scale and rotation WITHOUT translation.

Note
Typically this operation is used for scale and rotation from index -> world mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
linear forward 3x3 mapping of the input vector

Definition at line 3211 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyJacobianF ( const Vec3T &  ijk) const
inline

Apply the linear forward 3x3 transformation to an input 3d vector using 32bit floating point arithmetics, e.g. scale and rotation WITHOUT translation.

Note
Typically this operation is used for scale and rotation from index -> world mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
linear forward 3x3 mapping of the input vector

Definition at line 3220 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyMap ( const Vec3T &  ijk) const
inline

Apply the forward affine transformation to a vector using 64bit floating point arithmetics.

Note
Typically this operation is used for the scale, rotation and translation of index -> world mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
Forward mapping for affine transformation, i.e. (mat x ijk) + translation

Definition at line 3194 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::Map::applyMapF ( const Vec3T &  ijk) const
inline

Apply the forward affine transformation to a vector using 32bit floating point arithmetics.

Note
Typically this operation is used for the scale, rotation and translation of index -> world mapping
Template Parameters
Vec3TTemplate type of the 3D vector to be mapped
Parameters
ijk3D vector to be mapped - typically floating point index coordinates
Returns
Forward mapping for affine transformation, i.e. (mat x ijk) + translation

Definition at line 3202 of file NanoVDB.h.

__hostdev__ Vec3d nanovdb::Map::getVoxelSize ( ) const
inline

Return a voxels size in each coordinate direction, measured at the origin.

Definition at line 3274 of file NanoVDB.h.

template<typename MatT , typename Vec3T >
void nanovdb::Map::set ( const MatT &  mat,
const MatT &  invMat,
const Vec3T &  translate,
double  taper = 1.0 
)
inline

Initialize the member data from 3x3 or 4x4 matrices.

Note
This is not _hostdev__ since then MatT=openvdb::Mat4d will produce warnings

Definition at line 3278 of file NanoVDB.h.

template<typename Mat4T >
void nanovdb::Map::set ( const Mat4T &  mat,
const Mat4T &  invMat,
double  taper = 1.0 
)
inline

Initialize the member data from 4x4 matrices.

Note
The last (4th) row of invMat is actually ignored. This is not _hostdev__ since then Mat4T=openvdb::Mat4d will produce warnings

Definition at line 3183 of file NanoVDB.h.

template<typename Vec3T >
void nanovdb::Map::set ( double  scale,
const Vec3T &  translation,
double  taper = 1.0 
)
inline

Definition at line 3297 of file NanoVDB.h.

Member Data Documentation

double nanovdb::Map::mInvMatD[9]

Definition at line 3146 of file NanoVDB.h.

float nanovdb::Map::mInvMatF[9]

Definition at line 3142 of file NanoVDB.h.

double nanovdb::Map::mMatD[9]

Definition at line 3145 of file NanoVDB.h.

float nanovdb::Map::mMatF[9]

Definition at line 3141 of file NanoVDB.h.

double nanovdb::Map::mTaperD

Definition at line 3148 of file NanoVDB.h.

float nanovdb::Map::mTaperF

Definition at line 3144 of file NanoVDB.h.

double nanovdb::Map::mVecD[3]

Definition at line 3147 of file NanoVDB.h.

float nanovdb::Map::mVecF[3]

Definition at line 3143 of file NanoVDB.h.


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