OpenVDB  0.104.0
Public Types | Public Member Functions | List of all members
Transform Class Reference

Calculate an axis-aligned bounding box in index space from a bounding sphere in world space. More...

#include <Transform.h>

Public Types

typedef boost::shared_ptr
< Transform
Ptr
 
typedef boost::shared_ptr
< const Transform
ConstPtr
 

Public Member Functions

 Transform ()
 
 Transform (const MapBase::Ptr &)
 
 Transform (const Transform &)
 
 ~Transform ()
 
Ptr copy () const
 
bool isLinear () const
 Return true if the transformation map is exclusively linear/affine. More...
 
Name mapType () const
 Return the transformation map's type-name. More...
 
OPENVDB_DEPRECATED void rotate (double radians, const Axis axis=X_AXIS)
 
OPENVDB_DEPRECATED void translate (const Vec3d &)
 
OPENVDB_DEPRECATED void scale (const Vec3d &)
 
OPENVDB_DEPRECATED void scale (double)
 
OPENVDB_DEPRECATED void shear (double shear, Axis axis0, Axis axis1)
 
Vec3d voxelSize () const
 Return the size of a voxel using the linear component of the map. More...
 
Vec3d voxelSize (const Vec3d &xyz) const
 Return the size of a voxel at position (x, y, z). More...
 
OPENVDB_DEPRECATED Vec3d voxelDimensions () const
 Return the voxel dimensions of the linear component of the map. More...
 
OPENVDB_DEPRECATED Vec3d voxelDimensions (const Vec3d &xyz) const
 Return the voxel dimensions at position (x, y, z). More...
 
double voxelVolume () const
 Return the voxel volume of the linear component of the map. More...
 
double voxelVolume (const Vec3d &xyz) const
 Return the voxel volume at position (x, y, z). More...
 
bool hasUniformScale () const
 Return true if the voxels in world space are uniformly sized cubes. More...
 
void read (std::istream &)
 Unserialize this transform from the given stream. More...
 
void write (std::ostream &) const
 Serialize this transform to the given stream. More...
 
void print (std::ostream &os=std::cout, const std::string &indent="") const
 Print a description of this transform. More...
 
bool operator== (const Transform &other) const
 
bool operator!= (const Transform &other) const
 
void preRotate (double radians, const Axis axis=X_AXIS)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void preTranslate (const Vec3d &)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void preScale (const Vec3d &)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void preScale (double)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void preShear (double shear, Axis axis0, Axis axis1)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void postRotate (double radians, const Axis axis=X_AXIS)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void postTranslate (const Vec3d &)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void postScale (const Vec3d &)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void postScale (double)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
void postShear (double shear, Axis axis0, Axis axis1)
 Update the linear (affine) map by prepending or postfixing the appropriate operation. More...
 
Vec3d indexToWorld (const Vec3d &xyz) const
 Apply this transformation to the given coordinates. More...
 
Vec3d indexToWorld (const Coord &ijk) const
 Apply this transformation to the given coordinates. More...
 
Vec3d worldToIndex (const Vec3d &xyz) const
 Apply this transformation to the given coordinates. More...
 
Coord worldToIndexCellCentered (const Vec3d &xyz) const
 Apply this transformation to the given coordinates. More...
 
Coord worldToIndexNodeCentered (const Vec3d &xyz) const
 Apply this transformation to the given coordinates. More...
 
MapBase::ConstPtr baseMap () const
 Return a base pointer to the transformation map. More...
 
MapBase::Ptr baseMap ()
 Return a base pointer to the transformation map. More...
 
template<typename MapType >
MapType::Ptr map ()
 Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible. More...
 
template<typename MapType >
MapType::ConstPtr map () const
 Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible. More...
 
template<typename MapType >
MapType::ConstPtr constMap () const
 Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible. More...
 

Static Public Member Functions

static Transform::Ptr createLinearTransform (double voxelSize=1.0)
 Create and return a shared pointer to a new transform. More...
 
static Transform::Ptr createLinearTransform (const Mat4R &)
 Create and return a shared pointer to a new transform. More...
 
static OPENVDB_DEPRECATED
Transform::Ptr 
createFrustumTransform (const CoordBBox &, double taper, double depth, double voxelSize=1.0)
 Create and return a shared pointer to a new transform. More...
 
static Transform::Ptr createFrustumTransform (const BBoxd &, double taper, double depth, double voxelSize=1.0)
 Create and return a shared pointer to a new transform. More...
 

Detailed Description

Calculate an axis-aligned bounding box in index space from a bounding sphere in world space.

Member Typedef Documentation

typedef boost::shared_ptr<const Transform> ConstPtr
typedef boost::shared_ptr<Transform> Ptr

Constructor & Destructor Documentation

Transform ( )
inline
Transform ( const MapBase::Ptr map)
Transform ( const Transform other)
~Transform ( )
inline

Member Function Documentation

MapBase::ConstPtr baseMap ( ) const
inline

Return a base pointer to the transformation map.

MapBase::Ptr baseMap ( )
inline

Return a base pointer to the transformation map.

MapType::ConstPtr constMap ( ) const
inline

Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible.

Ptr copy ( ) const
inline
Transform::Ptr createFrustumTransform ( const CoordBBox bbox,
double  taper,
double  depth,
double  voxelSize = 1.0 
)
static

Create and return a shared pointer to a new transform.

Transform::Ptr createFrustumTransform ( const BBoxd bbox,
double  taper,
double  depth,
double  voxelSize = 1.0 
)
static

Create and return a shared pointer to a new transform.

Transform::Ptr createLinearTransform ( double  voxelSize = 1.0)
static

Create and return a shared pointer to a new transform.

Transform::Ptr createLinearTransform ( const Mat4R m)
static

Create and return a shared pointer to a new transform.

bool hasUniformScale ( ) const
inline

Return true if the voxels in world space are uniformly sized cubes.

Vec3d indexToWorld ( const Vec3d xyz) const
inline

Apply this transformation to the given coordinates.

Vec3d indexToWorld ( const Coord ijk) const
inline

Apply this transformation to the given coordinates.

bool isLinear ( ) const
inline

Return true if the transformation map is exclusively linear/affine.

MapType::Ptr map ( )
inline

Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible.

MapType::ConstPtr map ( ) const
inline

Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible.

Name mapType ( ) const
inline

Return the transformation map's type-name.

bool operator!= ( const Transform other) const
inline
bool operator== ( const Transform other) const
void postRotate ( double  radians,
const Axis  axis = X_AXIS 
)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void postScale ( const Vec3d s)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void postScale ( double  s)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void postShear ( double  shear,
Axis  axis0,
Axis  axis1 
)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void postTranslate ( const Vec3d t)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void preRotate ( double  radians,
const Axis  axis = X_AXIS 
)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void preScale ( const Vec3d s)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void preScale ( double  s)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void preShear ( double  shear,
Axis  axis0,
Axis  axis1 
)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void preTranslate ( const Vec3d t)

Update the linear (affine) map by prepending or postfixing the appropriate operation.

void print ( std::ostream &  os = std::cout,
const std::string &  indent = "" 
) const

Print a description of this transform.

Parameters
osa stream to which to write textual information
indenta string with which to prefix each line of text
void read ( std::istream &  is)

Unserialize this transform from the given stream.

OPENVDB_DEPRECATED void rotate ( double  radians,
const Axis  axis = X_AXIS 
)
Deprecated:
Use preRotate() instead.
OPENVDB_DEPRECATED void scale ( const Vec3d s)
Deprecated:
Use preScale() instead.
OPENVDB_DEPRECATED void scale ( double  s)
Deprecated:
Use preScale() instead.
OPENVDB_DEPRECATED void shear ( double  shear,
Axis  axis0,
Axis  axis1 
)
Deprecated:
Use preShear() instead.
OPENVDB_DEPRECATED void translate ( const Vec3d t)
OPENVDB_DEPRECATED Vec3d voxelDimensions ( ) const
inline

Return the voxel dimensions of the linear component of the map.

Deprecated:
Use voxelSize() instead.
OPENVDB_DEPRECATED Vec3d voxelDimensions ( const Vec3d xyz) const
inline

Return the voxel dimensions at position (x, y, z).

Note
Maps that have a nonlinear component (e.g., perspective and frustum maps) have position-dependent voxel dimensions.
Deprecated:
Use voxelSize() instead.
Vec3d voxelSize ( ) const
inline

Return the size of a voxel using the linear component of the map.

Vec3d voxelSize ( const Vec3d xyz) const
inline

Return the size of a voxel at position (x, y, z).

Note
Maps that have a nonlinear component (e.g., perspective and frustum maps) have position-dependent voxel sizes.
double voxelVolume ( ) const
inline

Return the voxel volume of the linear component of the map.

double voxelVolume ( const Vec3d xyz) const
inline

Return the voxel volume at position (x, y, z).

Vec3d worldToIndex ( const Vec3d xyz) const
inline

Apply this transformation to the given coordinates.

Coord worldToIndexCellCentered ( const Vec3d xyz) const
inline

Apply this transformation to the given coordinates.

Coord worldToIndexNodeCentered ( const Vec3d xyz) const
inline

Apply this transformation to the given coordinates.

void write ( std::ostream &  os) const

Serialize this transform to the given stream.


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