OpenVDB
2.0.0
|
This map is composed of three steps. Frist it will take a box of size (Lx X Ly X Lz) defined by an member data bounding box and map it into a frustum with near plane (1 X Ly/Lx) and precribed depth Then this frustum is transformed by an internal second map: most often a uniform scale, but other affects can be achieved by accumulating translation, shear and rotation: these are all applied to the second map. More...
#include <Maps.h>
Inherits MapBase.
Public Types | |
typedef boost::shared_ptr < NonlinearFrustumMap > | Ptr |
typedef boost::shared_ptr < const NonlinearFrustumMap > | ConstPtr |
typedef Ptr(* | MapFactory )() |
Public Member Functions | |
NonlinearFrustumMap () | |
NonlinearFrustumMap (const BBoxd &bb, double taper, double depth) | |
Constructor that takes an index-space bounding box to be mapped into a frustum with a given depth and taper (defined as ratio of nearplane/farplane). More... | |
NonlinearFrustumMap (const BBoxd &bb, double taper, double depth, const MapBase::Ptr &secondMap) | |
Constructor that takes an index-space bounding box to be mapped into a frustum with a given depth and taper (defined as ratio of nearplane/farplane). More... | |
NonlinearFrustumMap (const NonlinearFrustumMap &other) | |
NonlinearFrustumMap (const Vec3d &position, const Vec3d &direction, const Vec3d &up, double aspect, double z_near, double depth, Coord::ValueType x_count, Coord::ValueType z_count) | |
Constructor from a camera frustum. More... | |
~NonlinearFrustumMap () | |
MapBase::Ptr | copy () const |
Return a MapBase::Ptr to a deep copy of this map. More... | |
MapBase::Ptr | inverseMap () const |
Not implemented, since there is currently no map type that can represent the inverse of a frustum. More... | |
Name | type () const |
Return NonlinearFrustumMap . More... | |
bool | isLinear () const |
Return false (a NonlinearFrustumMap is never linear). More... | |
bool | hasUniformScale () const |
Return false (by convention false) More... | |
bool | isIdentity () const |
Return true if the map is equivalent to an identity. More... | |
virtual bool | isEqual (const MapBase &other) const |
Return true if this map is equal to the given map. More... | |
bool | operator== (const NonlinearFrustumMap &other) const |
bool | operator!= (const NonlinearFrustumMap &other) const |
Vec3d | applyMap (const Vec3d &in) const |
Return the image of in under the map. More... | |
Vec3d | applyInverseMap (const Vec3d &in) const |
Return the pre-image of in under the map. More... | |
Vec3d | applyJacobian (const Vec3d &in) const |
Return the Jacobian of the linear second map applied to in . More... | |
Vec3d | applyJacobian (const Vec3d &in, const Vec3d &isloc) const |
Return the Jacobian defined at isloc applied to in . More... | |
Vec3d | applyInverseJacobian (const Vec3d &in) const |
Return the Inverse Jacobian of the map applied to in. (i.e. inverse map with out translation) More... | |
Vec3d | applyInverseJacobian (const Vec3d &in, const Vec3d &isloc) const |
Return the Inverse Jacobian defined at isloc of the map applied to in. More... | |
Vec3d | applyJT (const Vec3d &in, const Vec3d &isloc) const |
Vec3d | applyJT (const Vec3d &in) const |
Return the Jacobian Transpose of the second map applied to in . More... | |
Vec3d | applyIJT (const Vec3d &in) const |
Return the transpose of the inverse Jacobian of the linear second map applied to in . More... | |
Vec3d | applyIJT (const Vec3d &d1_is, const Vec3d &ijk) const |
Mat3d | applyIJC (const Mat3d &in) const |
Return the Jacobian Curvature for the linear second map. More... | |
Mat3d | applyIJC (const Mat3d &d2_is, const Vec3d &d1_is, const Vec3d &ijk) const |
double | determinant () const |
Return the determinant of the Jacobian of linear second map. More... | |
double | determinant (const Vec3d &loc) const |
Vec3d | voxelSize () const |
Return the size of a voxel at the center of the near plane. More... | |
Vec3d | voxelSize (const Vec3d &loc) const |
Returns the lengths of the images of the three segments from loc to loc + (1,0,0), from loc to loc + (0,1,0) and from loc to loc + (0,0,1) More... | |
AffineMap::Ptr | getAffineMap () const |
void | setTaper (double t) |
set the taper value, the ratio of nearplane width / far plane width More... | |
double | getTaper () const |
Return the taper value. More... | |
void | setDepth (double d) |
set the frustum depth: distance between near and far plane = frustm depth * frustm x-width More... | |
double | getDepth () const |
Return the unscaled frustm depth. More... | |
double | getGamma () const |
const BBoxd & | getBBox () const |
Return the bounding box that defines the frustum in pre-image space. More... | |
const AffineMap & | secondMap () const |
Return MapBase::Ptr& to the second map. More... | |
bool | isValid () const |
bool | hasSimpleAffine () const |
Return true if the second map is a uniform scale, Rotation and translation. More... | |
void | read (std::istream &is) |
read serialization More... | |
void | write (std::ostream &os) const |
write serialization More... | |
std::string | str () const |
string serialization, useful for debuging More... | |
template<typename MapT > | |
bool | isType () const |
Return true if this map is of concrete type MapT (e.g., AffineMap). More... | |
MapBase::Ptr | preRotate (double radians, Axis axis=X_AXIS) const |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map. More... | |
MapBase::Ptr | preTranslate (const Vec3d &t) const |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map. More... | |
MapBase::Ptr | preScale (const Vec3d &s) const |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map. More... | |
MapBase::Ptr | preShear (double shear, Axis axis0, Axis axis1) const |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map. More... | |
MapBase::Ptr | postRotate (double radians, Axis axis=X_AXIS) const |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map. More... | |
MapBase::Ptr | postTranslate (const Vec3d &t) const |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map. More... | |
MapBase::Ptr | postScale (const Vec3d &s) const |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map. More... | |
MapBase::Ptr | postShear (double shear, Axis axis0, Axis axis1) const |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map. More... | |
Static Public Member Functions | |
static MapBase::Ptr | create () |
Return a MapBase::Ptr to a new NonlinearFrustumMap. More... | |
static bool | isRegistered () |
static void | registerMap () |
static Name | mapType () |
Return NonlinearFrustumMap . More... | |
Static Protected Member Functions | |
template<typename MapT > | |
static bool | isEqualBase (const MapT &self, const MapBase &other) |
This map is composed of three steps. Frist it will take a box of size (Lx X Ly X Lz) defined by an member data bounding box and map it into a frustum with near plane (1 X Ly/Lx) and precribed depth Then this frustum is transformed by an internal second map: most often a uniform scale, but other affects can be achieved by accumulating translation, shear and rotation: these are all applied to the second map.
typedef boost::shared_ptr<const NonlinearFrustumMap> ConstPtr |
|
inherited |
typedef boost::shared_ptr<NonlinearFrustumMap> Ptr |
|
inline |
|
inline |
Constructor that takes an index-space bounding box to be mapped into a frustum with a given depth and taper (defined as ratio of nearplane/farplane).
|
inline |
Constructor that takes an index-space bounding box to be mapped into a frustum with a given depth and taper (defined as ratio of nearplane/farplane).
This frustum is further modifed by the secondMap, intended to be a simple translation and rotation and uniform scale
|
inline |
|
inline |
Constructor from a camera frustum.
position | the tip of the frustum (i.e., the camera's position). |
direction | a vector pointing from position toward the near plane. |
up | a non-unit vector describing the direction and extent of the frustum's intersection on the near plane. Together, up must be orthogonal to direction. |
aspect | the aspect ratio of the frustum intersection with near plane defined as width / height |
z_near,depth | the distance from position along direction to the near and far planes of the frustum. |
x_count | the number of voxels, aligned with left, across the face of the frustum |
z_count | the number of voxels, aligned with direction, between the near and far planes |
|
inline |
Return the Jacobian Curvature for the linear second map.
Implements MapBase.
Return the Jacobian Curvature: all the second derivatives in range space
d2_is | second derivative matrix computed in index space |
d1_is | gradient computed in index space |
ijk | the index space location where the result is computed |
Implements MapBase.
Return the transpose of the inverse Jacobian of the linear second map applied to in
.
Implements MapBase.
Return the transpose of the inverse Jacobain (at locW
applied to in
. ijk
is the location in the pre-image space (e.g. index space)
Implements MapBase.
Return the Inverse Jacobian of the map applied to in. (i.e. inverse map with out translation)
Implements MapBase.
Return the Inverse Jacobian defined at isloc
of the map applied to in.
Implements MapBase.
Return the pre-image of in
under the map.
Implements MapBase.
Return the Jacobian of the linear second map applied to in
.
Implements MapBase.
Return the Jacobian defined at isloc
applied to in
.
Implements MapBase.
Return the Jacobian Transpose of the map applied to vector in
at indexloc
. This tranforms range-space gradients to domain-space gradients.
Implements MapBase.
Return the Jacobian Transpose of the second map applied to in
.
Implements MapBase.
Return the image of in
under the map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a deep copy of this map.
Implements MapBase.
|
inlinestatic |
Return a MapBase::Ptr to a new NonlinearFrustumMap.
|
inlinevirtual |
Return the determinant of the Jacobian of linear second map.
Implements MapBase.
|
inlinevirtual |
Return the determinate of the Jacobian evaluated at loc
loc
is a location in the pre-image space (e.g., index space)
Implements MapBase.
|
inlinevirtual |
Implements MapBase.
|
inline |
Return the bounding box that defines the frustum in pre-image space.
|
inline |
Return the unscaled frustm depth.
|
inline |
|
inline |
Return the taper value.
|
inline |
Return true
if the second map is a uniform scale, Rotation and translation.
|
inlinevirtual |
Return false
(by convention false)
Implements MapBase.
|
inlinevirtual |
Not implemented, since there is currently no map type that can represent the inverse of a frustum.
NotImplementedError |
Implements MapBase.
|
inlinevirtual |
Return true
if this map is equal to the given map.
Implements MapBase.
|
inlinestaticprotectedinherited |
|
inline |
Return true
if the map is equivalent to an identity.
|
inlinevirtual |
Return false
(a NonlinearFrustumMap is never linear).
Implements MapBase.
|
inlinestatic |
|
inlineinherited |
Return true
if this map is of concrete type MapT
(e.g., AffineMap).
|
inline |
Return true
if the the bounding box in index space that defines the region that is maped into the frustum is non-zero, otherwise false
|
inlinestatic |
Return NonlinearFrustumMap
.
|
inline |
|
inline |
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of postfixing the appropiate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
Return a MapBase::Ptr to a new map that is the result of prepending the appropriate operation to the linear part of this map.
Implements MapBase.
|
inlinevirtual |
read serialization
Implements MapBase.
|
inlinestatic |
|
inline |
Return MapBase::Ptr& to the second map.
|
inline |
set the frustum depth: distance between near and far plane = frustm depth * frustm x-width
|
inline |
set the taper value, the ratio of nearplane width / far plane width
|
inlinevirtual |
string serialization, useful for debuging
Implements MapBase.
|
inlinevirtual |
Return NonlinearFrustumMap
.
Implements MapBase.
|
inlinevirtual |
Return the size of a voxel at the center of the near plane.
Implements MapBase.
Returns the lengths of the images of the three segments from loc to loc + (1,0,0), from loc to loc + (0,1,0) and from loc to loc + (0,0,1)
loc | a location in the pre-image space (e.g., index space) |
Implements MapBase.
|
inlinevirtual |
write serialization
Implements MapBase.