OpenVDB: AffineMap Class Reference

OpenVDB 4.0.2

Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
AffineMap Class Reference

A general linear transform using homogeneous coordinates to perform rotation, scaling, shear and translation. More...

`#include <Maps.h>`

Inherits MapBase.

## Public Types
using | Ptr = SharedPtr< AffineMap >
using | ConstPtr = SharedPtr< const AffineMap >
using | MapFactory = Ptr(*)()

## Public Member Functions
| AffineMap ()
| AffineMap (const Mat3d &m)
| AffineMap (const Mat4d &m)
| AffineMap (const AffineMap &other)
| AffineMap (const AffineMap &first, const AffineMap &second)
| constructor that merges the matrixes for two affine maps More...
| ~AffineMap () override=default
MapBase::Ptr | copy () const override
| Return a MapBase::Ptr to a deep copy of this map. More...
MapBase::Ptr | inverseMap () const override
| Return a new map representing the inverse of this map. More...
Name | type () const override
| Return the name of this map's concrete type (e.g., `"AffineMap"`). More...
bool | isLinear () const override
| Return `true` (an AffineMap is always linear). More...
bool | hasUniformScale () const override
| Return `false` ( test if this is unitary with translation ) More...
bool | isEqual (const MapBase &other) const override
| Return `true` if this map is equal to the given map. More...
bool | operator== (const AffineMap &other) const
bool | operator!= (const AffineMap &other) const
AffineMap & | operator= (const AffineMap &other)
Vec3d | applyMap (const Vec3d &in) const override
| Return the image of `in` under the map. More...
Vec3d | applyInverseMap (const Vec3d &in) const override
| Return the pre-image of `in` under the map. More...
Vec3d | applyJacobian (const Vec3d &in, const Vec3d &) const override
| Return the Jacobian of the map applied to in. More...
Vec3d | applyJacobian (const Vec3d &in) const override
| Return the Jacobian of the map applied to in. More...
Vec3d | applyInverseJacobian (const Vec3d &in, const Vec3d &) const override
| Return the Inverse Jacobian of the map applied to in (i.e. inverse map with out translation) More...
Vec3d | applyInverseJacobian (const Vec3d &in) const override
| Return the Inverse Jacobian of the map applied to in (i.e. inverse map with out translation) More...
Vec3d | applyJT (const Vec3d &in, const Vec3d &) const override
Vec3d | applyJT (const Vec3d &in) const override
| Return the Jacobian Transpose of the map applied to in. More...
Vec3d | applyIJT (const Vec3d &in, const Vec3d &) const override
| Return the transpose of the inverse Jacobian of the map applied to in. More...
Vec3d | applyIJT (const Vec3d &in) const override
| Return the transpose of the inverse Jacobian of the map applied to `in`. More...
Mat3d | applyIJC (const Mat3d &m) const override
| Return the Jacobian Curvature: zero for a linear map. More...
Mat3d | applyIJC (const Mat3d &in, const Vec3d &, const Vec3d &) const override
double | determinant (const Vec3d &) const override
| Return the determinant of the Jacobian, ignores argument. More...
double | determinant () const override
| Return the determinant of the Jacobian. More...
bool | isIdentity () const
| Return `true` if the underlying matrix is approximately an identity. More...
bool | isDiagonal () const
| Return `true` if the underylying matrix is diagonal. More...
bool | isScale () const
| Return `true` if the map is equivalent to a ScaleMap. More...
bool | isScaleTranslate () const
| Return `true` if the map is equivalent to a ScaleTranslateMap. More...
void | read (std::istream &is) override
| read serialization More...
void | write (std::ostream &os) const override
| write serialization More...
std::string | str () const override
| string serialization, useful for debugging More...
SharedPtr< FullyDecomposedMap > | createDecomposedMap ()
| on-demand decomposition of the affine map More...
AffineMap::Ptr | getAffineMap () const override
| Return AffineMap::Ptr to a deep copy of the current AffineMap. More...
AffineMap::Ptr | inverse () const
| Return AffineMap::Ptr to the inverse of this map. More...
Mat4d | getMat4 () const
| Return the matrix representation of this AffineMap. More...
const Mat4d & | getConstMat4 () const
const Mat3d & | getConstJacobianInv () const
template<typename MapT >
bool | isType () const
| Return `true` if this map is of concrete type `MapT` (e.g., AffineMap). More...
Vec3d | voxelSize () const override
| Return the lengths of the images of the segments (0,0,0)-(1,0,0), (0,0,0)-(0,1,0) and (0,0,0)-(0,0,1). More...
Vec3d | voxelSize (const Vec3d &) const override
| Return the lengths of the images of the segments (0,0,0)-(1,0,0), (0,0,0)-(0,1,0) and (0,0,0)-(0,0,1). More...
void | accumPreRotation (Axis axis, double radians)
| Modify the existing affine map by pre-applying the given operation. More...
void | accumPreScale (const Vec3d &v)
| Modify the existing affine map by pre-applying the given operation. More...
void | accumPreTranslation (const Vec3d &v)
| Modify the existing affine map by pre-applying the given operation. More...
void | accumPreShear (Axis axis0, Axis axis1, double shear)
| Modify the existing affine map by pre-applying the given operation. More...
void | accumPostRotation (Axis axis, double radians)
| Modify the existing affine map by post-applying the given operation. More...
void | accumPostScale (const Vec3d &v)
| Modify the existing affine map by post-applying the given operation. More...
void | accumPostTranslation (const Vec3d &v)
| Modify the existing affine map by post-applying the given operation. More...
void | accumPostShear (Axis axis0, Axis axis1, double shear)
| Modify the existing affine map by post-applying the given operation. More...
MapBase::Ptr | preRotate (double radians, Axis axis=X_AXIS) const override
| Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation. More...
MapBase::Ptr | preTranslate (const Vec3d &t) const override
| Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation. More...
MapBase::Ptr | preScale (const Vec3d &s) const override
| Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation. More...
MapBase::Ptr | preShear (double shear, Axis axis0, Axis axis1) const override
| Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation. More...
MapBase::Ptr | postRotate (double radians, Axis axis=X_AXIS) const override
| Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation. More...
MapBase::Ptr | postTranslate (const Vec3d &t) const override
| Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation. More...
MapBase::Ptr | postScale (const Vec3d &s) const override
| Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation. More...
MapBase::Ptr | postShear (double shear, Axis axis0, Axis axis1) const override
| Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation. More...

## Static Public Member Functions
static MapBase::Ptr | create ()
| Return a MapBase::Ptr to a new AffineMap. More...
static bool | isRegistered ()
static void | registerMap ()
static Name | mapType ()

## Static Protected Member Functions
template<typename MapT >
static bool | isEqualBase (const MapT &self, const MapBase &other)

## Detailed Description

A general linear transform using homogeneous coordinates to perform rotation, scaling, shear and translation.

## Member Typedef Documentation

## ◆ ConstPtr

using ConstPtr = SharedPtr<const AffineMap>

## ◆ MapFactory

using MapFactory = Ptr (*)()
| inherited

## ◆ Ptr

using Ptr = SharedPtr<AffineMap>

## Constructor & Destructor Documentation

## ◆ AffineMap() [1/5]

AffineMap | ( |  | ) |
| inline

## ◆ AffineMap() [2/5]

AffineMap | ( | const Mat3d & | m | ) |
| inline

## ◆ AffineMap() [3/5]

AffineMap | ( | const Mat4d & | m | ) |
| inline

## ◆ AffineMap() [4/5]

AffineMap | ( | const AffineMap & | other | ) |
| inline

## ◆ AffineMap() [5/5]

AffineMap | ( | const AffineMap & | first,
|  | const AffineMap & | second
| ) |  |
| inline

constructor that merges the matrixes for two affine maps

## ◆ ~AffineMap()

~AffineMap | ( |  | ) |
| overridedefault

## Member Function Documentation

## ◆ accumPostRotation()

void accumPostRotation | ( | Axis | axis,
|  | double | radians
| ) |  |
| inline

Modify the existing affine map by post-applying the given operation.

## ◆ accumPostScale()

void accumPostScale | ( | const Vec3d & | v | ) |
| inline

Modify the existing affine map by post-applying the given operation.

## ◆ accumPostShear()

void accumPostShear | ( | Axis | axis0,
|  | Axis | axis1,
|  | double | shear
| ) |  |
| inline

Modify the existing affine map by post-applying the given operation.

## ◆ accumPostTranslation()

void accumPostTranslation | ( | const Vec3d & | v | ) |
| inline

Modify the existing affine map by post-applying the given operation.

## ◆ accumPreRotation()

void accumPreRotation | ( | Axis | axis,
|  | double | radians
| ) |  |
| inline

Modify the existing affine map by pre-applying the given operation.

## ◆ accumPreScale()

void accumPreScale | ( | const Vec3d & | v | ) |
| inline

Modify the existing affine map by pre-applying the given operation.

## ◆ accumPreShear()

void accumPreShear | ( | Axis | axis0,
|  | Axis | axis1,
|  | double | shear
| ) |  |
| inline

Modify the existing affine map by pre-applying the given operation.

## ◆ accumPreTranslation()

void accumPreTranslation | ( | const Vec3d & | v | ) |
| inline

Modify the existing affine map by pre-applying the given operation.

## ◆ applyIJC() [1/2]

Mat3d applyIJC | ( | const Mat3d & | m | ) | const
| inlineoverridevirtual

Return the Jacobian Curvature: zero for a linear map.

Implements MapBase.

## ◆ applyIJC() [2/2]

Mat3d applyIJC | ( | const Mat3d & | in,
|  | const Vec3d & | ,
|  | const Vec3d & |
| ) |  | const
| inlineoverridevirtual

Implements MapBase.

## ◆ applyIJT() [1/2]

Vec3d applyIJT | ( | const Vec3d & | in,
|  | const Vec3d & |
| ) |  | const
| inlineoverridevirtual

Return the transpose of the inverse Jacobian of the map applied to in.

Implements MapBase.

## ◆ applyIJT() [2/2]

Vec3d applyIJT | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the transpose of the inverse Jacobian of the map applied to `in`.

Implements MapBase.

## ◆ applyInverseJacobian() [1/2]

Vec3d applyInverseJacobian | ( | const Vec3d & | in,
|  | const Vec3d & |
| ) |  | const
| inlineoverridevirtual

Return the Inverse Jacobian of the map applied to in (i.e. inverse map with out translation)

Implements MapBase.

## ◆ applyInverseJacobian() [2/2]

Vec3d applyInverseJacobian | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the Inverse Jacobian of the map applied to in (i.e. inverse map with out translation)

Implements MapBase.

## ◆ applyInverseMap()

Vec3d applyInverseMap | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the pre-image of `in` under the map.

Implements MapBase.

## ◆ applyJacobian() [1/2]

Vec3d applyJacobian | ( | const Vec3d & | in,
|  | const Vec3d & |
| ) |  | const
| inlineoverridevirtual

Return the Jacobian of the map applied to in.

Implements MapBase.

## ◆ applyJacobian() [2/2]

Vec3d applyJacobian | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the Jacobian of the map applied to in.

Implements MapBase.

## ◆ applyJT() [1/2]

Vec3d applyJT | ( | const Vec3d & | in,
|  | const Vec3d & |
| ) |  | const
| inlineoverridevirtual

Return the Jacobian Transpose of the map applied to in. This tranforms range-space gradients to domain-space gradients

Implements MapBase.

## ◆ applyJT() [2/2]

Vec3d applyJT | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the Jacobian Transpose of the map applied to in.

Implements MapBase.

## ◆ applyMap()

Vec3d applyMap | ( | const Vec3d & | in | ) | const
| inlineoverridevirtual

Return the image of `in` under the map.

Implements MapBase.

## ◆ copy()

MapBase::Ptr copy | ( |  | ) | const
| inlineoverridevirtual

Return a MapBase::Ptr to a deep copy of this map.

Implements MapBase.

## ◆ create()

static MapBase::Ptr create | ( |  | ) |
| inlinestatic

Return a MapBase::Ptr to a new AffineMap.

## ◆ createDecomposedMap()

SharedPtr<FullyDecomposedMap> createDecomposedMap | ( |  | ) |
| inline

on-demand decomposition of the affine map

## ◆ determinant() [1/2]

double determinant | ( | const Vec3d & |  | ) | const
| inlineoverridevirtual

Return the determinant of the Jacobian, ignores argument.

Implements MapBase.

## ◆ determinant() [2/2]

double determinant | ( |  | ) | const
| inlineoverridevirtual

Return the determinant of the Jacobian.

Implements MapBase.

## ◆ getAffineMap()

AffineMap::Ptr getAffineMap | ( |  | ) | const
| inlineoverridevirtual

Return AffineMap::Ptr to a deep copy of the current AffineMap.

Implements MapBase.

## ◆ getConstJacobianInv()

const Mat3d& getConstJacobianInv | ( |  | ) | const
| inline

## ◆ getConstMat4()

const Mat4d& getConstMat4 | ( |  | ) | const
| inline

## ◆ getMat4()

Mat4d getMat4 | ( |  | ) | const
| inline

Return the matrix representation of this AffineMap.

## ◆ hasUniformScale()

bool hasUniformScale | ( |  | ) | const
| inlineoverridevirtual

Return `false` ( test if this is unitary with translation )

Implements MapBase.

## ◆ inverse()

AffineMap::Ptr inverse | ( |  | ) | const
| inline

Return AffineMap::Ptr to the inverse of this map.

## ◆ inverseMap()

MapBase::Ptr inverseMap | ( |  | ) | const
| inlineoverridevirtual

Return a new map representing the inverse of this map.

Exceptions

  NotImplementedError | if the map is a NonlinearFrustumMap.

Warning
  Houdini 12.5 uses an earlier version of OpenVDB, and maps created with that version lack a virtual table entry for this method. Do not call this method from Houdini 12.5.

Implements MapBase.

## ◆ isDiagonal()

bool isDiagonal | ( |  | ) | const
| inline

Return `true` if the underylying matrix is diagonal.

## ◆ isEqual()

bool isEqual | ( | const MapBase & | other | ) | const
| inlineoverridevirtual

Return `true` if this map is equal to the given map.

Implements MapBase.

## ◆ isEqualBase()

static bool isEqualBase | ( | const MapT & | self,
|  | const MapBase & | other
| ) |  |
| inlinestaticprotectedinherited

## ◆ isIdentity()

bool isIdentity | ( |  | ) | const
| inline

Return `true` if the underlying matrix is approximately an identity.

## ◆ isLinear()

bool isLinear | ( |  | ) | const
| inlineoverridevirtual

Return `true` (an AffineMap is always linear).

Implements MapBase.

## ◆ isRegistered()

static bool isRegistered | ( |  | ) |
| inlinestatic

## ◆ isScale()

bool isScale | ( |  | ) | const
| inline

Return `true` if the map is equivalent to a ScaleMap.

## ◆ isScaleTranslate()

bool isScaleTranslate | ( |  | ) | const
| inline

Return `true` if the map is equivalent to a ScaleTranslateMap.

## ◆ isType()

bool isType | ( |  | ) | const
| inlineinherited

Return `true` if this map is of concrete type `MapT` (e.g., AffineMap).

## ◆ mapType()

static Name mapType | ( |  | ) |
| inlinestatic

## ◆ operator!=()

bool operator!= | ( | const AffineMap & | other | ) | const
| inline

## ◆ operator=()

AffineMap& operator= | ( | const AffineMap & | other | ) |
| inline

## ◆ operator==()

bool operator== | ( | const AffineMap & | other | ) | const
| inline

## ◆ postRotate()

MapBase::Ptr postRotate | ( | double | radians,
|  | Axis | axis = `X_AXIS`
| ) |  | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation.

Implements MapBase.

## ◆ postScale()

MapBase::Ptr postScale | ( | const Vec3d & | s | ) | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation.

Implements MapBase.

## ◆ postShear()

MapBase::Ptr postShear | ( | double | shear,
|  | Axis | axis0,
|  | Axis | axis1
| ) |  | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation.

Implements MapBase.

## ◆ postTranslate()

MapBase::Ptr postTranslate | ( | const Vec3d & | t | ) | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of postfixing the appropraite operation.

Implements MapBase.

## ◆ preRotate()

MapBase::Ptr preRotate | ( | double | radians,
|  | Axis | axis = `X_AXIS`
| ) |  | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation.

Implements MapBase.

## ◆ preScale()

MapBase::Ptr preScale | ( | const Vec3d & | s | ) | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation.

Implements MapBase.

## ◆ preShear()

MapBase::Ptr preShear | ( | double | shear,
|  | Axis | axis0,
|  | Axis | axis1
| ) |  | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation.

Implements MapBase.

## ◆ preTranslate()

MapBase::Ptr preTranslate | ( | const Vec3d & | t | ) | const
| inlineoverridevirtual

Return a MapBase::Ptr to a new map that is the result of prepending the appropraite operation.

Implements MapBase.

## ◆ read()

void read | ( | std::istream & | is | ) |
| inlineoverridevirtual

read serialization

Implements MapBase.

## ◆ registerMap()

static void registerMap | ( |  | ) |
| inlinestatic

## ◆ str()

std::string str | ( |  | ) | const
| inlineoverridevirtual

string serialization, useful for debugging

Implements MapBase.

## ◆ type()

Name type | ( |  | ) | const
| inlineoverridevirtual

Return the name of this map's concrete type (e.g., `"AffineMap"`).

Implements MapBase.

## ◆ voxelSize() [1/2]

Vec3d voxelSize | ( |  | ) | const
| inlineoverridevirtual

Return the lengths of the images of the segments (0,0,0)-(1,0,0), (0,0,0)-(0,1,0) and (0,0,0)-(0,0,1).

Implements MapBase.

## ◆ voxelSize() [2/2]

Vec3d voxelSize | ( | const Vec3d & |  | ) | const
| inlineoverridevirtual

Return the lengths of the images of the segments (0,0,0)-(1,0,0), (0,0,0)-(0,1,0) and (0,0,0)-(0,0,1).

Implements MapBase.

## ◆ write()

void write | ( | std::ostream & | os | ) | const
| inlineoverridevirtual

write serialization

Implements MapBase.

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

- Maps.h