OpenVDB  11.0.0
Public Member Functions | Public Attributes | List of all members
Map Struct Reference

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

#include <nanovdb/NanoVDB.h>

Public Member Functions

 Map ()
 Default constructor for the identity map. More...
 
 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 >
Vec3T applyMap (const Vec3T &ijk) const
 Apply the forward affine transformation to a vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
Vec3T applyMapF (const Vec3T &ijk) const
 Apply the forward affine transformation to a vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
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 >
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 >
Vec3T applyInverseMap (const Vec3T &xyz) const
 Apply the inverse affine mapping to a vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
Vec3T applyInverseMapF (const Vec3T &xyz) const
 Apply the inverse affine mapping to a vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
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 >
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 >
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 >
Vec3T applyIJTF (const Vec3T &xyz) const
 
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.

Constructor & Destructor Documentation

Map ( )
inline

Default constructor for the identity map.

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

Member Function Documentation

Vec3T 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
Vec3T applyIJTF ( const Vec3T &  xyz) const
inline
Vec3T 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
Vec3T 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
Vec3T 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
Vec3T 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
Vec3T 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
Vec3T 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
Vec3T 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
Vec3T 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
Vec3d getVoxelSize ( ) const
inline

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

void 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
void 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
void set ( double  scale,
const Vec3T &  translation,
double  taper = 1.0 
)
inline

Member Data Documentation

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