|
OpenVDB
1.1.0
|
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. | |
| bool | isIdentity () const |
Return true if the transform is equivalent to an idenity. | |
| Name | mapType () const |
| Return the transformation map's type-name. | |
| Vec3d | voxelSize () const |
| Return the size of a voxel using the linear component of the map. | |
| Vec3d | voxelSize (const Vec3d &xyz) const |
| Return the size of a voxel at position (x, y, z). | |
| double | voxelVolume () const |
| Return the voxel volume of the linear component of the map. | |
| double | voxelVolume (const Vec3d &xyz) const |
| Return the voxel volume at position (x, y, z). | |
| bool | hasUniformScale () const |
| Return true if the voxels in world space are uniformly sized cubes. | |
| void | read (std::istream &) |
| Unserialize this transform from the given stream. | |
| void | write (std::ostream &) const |
| Serialize this transform to the given stream. | |
| void | print (std::ostream &os=std::cout, const std::string &indent="") const |
| Print a description of this transform. | |
| 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. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preTranslate (const Vec3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preScale (const Vec3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preScale (double) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preShear (double shear, Axis axis0, Axis axis1) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preMult (const Mat4d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | preMult (const Mat3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postRotate (double radians, const Axis axis=X_AXIS) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postTranslate (const Vec3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postScale (const Vec3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postScale (double) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postShear (double shear, Axis axis0, Axis axis1) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postMult (const Mat4d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| void | postMult (const Mat3d &) |
| Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last. | |
| Vec3d | indexToWorld (const Vec3d &xyz) const |
| Apply this transformation to the given coordinates. | |
| Vec3d | indexToWorld (const Coord &ijk) const |
| Apply this transformation to the given coordinates. | |
| Vec3d | worldToIndex (const Vec3d &xyz) const |
| Apply this transformation to the given coordinates. | |
| Coord | worldToIndexCellCentered (const Vec3d &xyz) const |
| Apply this transformation to the given coordinates. | |
| Coord | worldToIndexNodeCentered (const Vec3d &xyz) const |
| Apply this transformation to the given coordinates. | |
| MapBase::ConstPtr | baseMap () const |
| Return a base pointer to the transformation map. | |
| MapBase::Ptr | baseMap () |
| Return a base pointer to the transformation map. | |
| 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. | |
| 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. | |
| 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. | |
Static Public Member Functions | |
| static Transform::Ptr | createLinearTransform (double voxelSize=1.0) |
| Create and return a shared pointer to a new transform. | |
| static Transform::Ptr | createLinearTransform (const Mat4R &) |
| Create and return a shared pointer to a new transform. | |
| static Transform::Ptr | createFrustumTransform (const BBoxd &, double taper, double depth, double voxelSize=1.0) |
| Create and return a shared pointer to a new transform. | |
Calculate an axis-aligned bounding box in index space from a bounding sphere in world space.
|
inline |
| Transform | ( | const MapBase::Ptr & | ) |
|
inline |
|
inline |
Return a base pointer to the transformation map.
|
inline |
Return a base pointer to the transformation 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.
|
inline |
|
static |
Create and return a shared pointer to a new transform.
|
static |
Create and return a shared pointer to a new transform.
|
static |
Create and return a shared pointer to a new transform.
|
inline |
Return true if the voxels in world space are uniformly sized cubes.
Apply this transformation to the given coordinates.
Apply this transformation to the given coordinates.
| bool isIdentity | ( | ) | const |
Return true if the transform is equivalent to an idenity.
|
inline |
Return true if the transformation map is exclusively linear/affine.
|
inline |
Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible.
|
inline |
Return the result of downcasting the base map pointer to a MapType pointer, or return a null pointer if the types are incompatible.
|
inline |
Return the transformation map's type-name.
|
inline |
| bool operator== | ( | const Transform & | other | ) | const |
| void postMult | ( | const Mat4d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void postMult | ( | const Mat3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void postScale | ( | const Vec3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void postScale | ( | double | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void postTranslate | ( | const Vec3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void preMult | ( | const Mat4d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void preMult | ( | const Mat3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void preScale | ( | const Vec3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void preScale | ( | double | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void preTranslate | ( | const Vec3d & | ) |
Update the linear (affine) map by prepending or postfixing the appropriate operation. In the case of a frustum, the pre-operations apply to the linear part of the transform and not the entire transform, while the post-operations are allways applied last.
| void print | ( | std::ostream & | os = std::cout, |
| const std::string & | indent = "" |
||
| ) | const |
Print a description of this transform.
| os | a stream to which to write textual information |
| indent | a string with which to prefix each line of text |
| void read | ( | std::istream & | ) |
Unserialize this transform from the given stream.
|
inline |
Return the size of a voxel using the linear component of the map.
Return the size of a voxel at position (x, y, z).
|
inline |
Return the voxel volume of the linear component of the map.
|
inline |
Return the voxel volume at position (x, y, z).
Apply this transformation to the given coordinates.
Apply this transformation to the given coordinates.
Apply this transformation to the given coordinates.
| void write | ( | std::ostream & | ) | const |
Serialize this transform to the given stream.
1.8.1.2