Simbody  3.5
SimTK::Geo::OrientedBox_< P > Class Template Reference

TODO: A 3d box oriented and positioned with respect to an unspecified frame F. More...

Public Member Functions

 OrientedBox_ ()
 Construct an uninitialized OrientedBox object; the dimensions and pose will be garbage. More...
 
 OrientedBox_ (const TransformP &X_FB, const Geo::Box_< P > &box)
 Construct an OrientedBox with the given box shape with positioned and oriented according to the given Transform X_FB which gives the box local frame B (at the box center) in an unspecifed frame F. More...
 
 OrientedBox_ (const TransformP &X_FB, const Vec3P &halfLengths)
 Construct an OrientedBox with the given location and half-dimensions. More...
 
OrientedBox_setTransform (const TransformP &newX_FB)
 Change the pose of this box. More...
 
OrientedBox_setHalfLengths (const Vec3P &halfLengths)
 Change the dimensions of this box. More...
 
const Vec3PgetCenter () const
 
Vec3PupdCenter ()
 
const RotationPgetOrientation () const
 
RotationPupdOrientation ()
 
const TransformPgetTransform () const
 
TransformPupdTransform ()
 
const Vec3PgetHalfLengths () const
 
const Box_< P > & getBox () const
 
Box_< P > & updBox ()
 
bool containsPoint (const Vec3P &pt_F) const
 Given a point measured and expressed in the base frame F, determine whether it is strictly contained in the box (just touching doesn't count). More...
 
OrientedBox_stretchBoundary ()
 Stretch this box in place by a small amount to ensure that there will be no roundoff problems if this is used as a bounding box. More...
 

Detailed Description

template<class P>
class SimTK::Geo::OrientedBox_< P >

TODO: A 3d box oriented and positioned with respect to an unspecified frame F.

Constructor & Destructor Documentation

template<class P>
SimTK::Geo::OrientedBox_< P >::OrientedBox_ ( )
inline

Construct an uninitialized OrientedBox object; the dimensions and pose will be garbage.

template<class P>
SimTK::Geo::OrientedBox_< P >::OrientedBox_ ( const TransformP X_FB,
const Geo::Box_< P > &  box 
)
inline

Construct an OrientedBox with the given box shape with positioned and oriented according to the given Transform X_FB which gives the box local frame B (at the box center) in an unspecifed frame F.

template<class P>
SimTK::Geo::OrientedBox_< P >::OrientedBox_ ( const TransformP X_FB,
const Vec3P halfLengths 
)
inline

Construct an OrientedBox with the given location and half-dimensions.

Member Function Documentation

template<class P>
OrientedBox_& SimTK::Geo::OrientedBox_< P >::setTransform ( const TransformP newX_FB)
inline

Change the pose of this box.

template<class P>
OrientedBox_& SimTK::Geo::OrientedBox_< P >::setHalfLengths ( const Vec3P halfLengths)
inline

Change the dimensions of this box.

template<class P>
const Vec3P& SimTK::Geo::OrientedBox_< P >::getCenter ( ) const
inline
template<class P>
Vec3P& SimTK::Geo::OrientedBox_< P >::updCenter ( )
inline
template<class P>
const RotationP& SimTK::Geo::OrientedBox_< P >::getOrientation ( ) const
inline
template<class P>
RotationP& SimTK::Geo::OrientedBox_< P >::updOrientation ( )
inline
template<class P>
const TransformP& SimTK::Geo::OrientedBox_< P >::getTransform ( ) const
inline
template<class P>
TransformP& SimTK::Geo::OrientedBox_< P >::updTransform ( )
inline
template<class P>
const Vec3P& SimTK::Geo::OrientedBox_< P >::getHalfLengths ( ) const
inline
template<class P>
const Box_<P>& SimTK::Geo::OrientedBox_< P >::getBox ( ) const
inline
template<class P>
Box_<P>& SimTK::Geo::OrientedBox_< P >::updBox ( )
inline
template<class P>
bool SimTK::Geo::OrientedBox_< P >::containsPoint ( const Vec3P pt_F) const
inline

Given a point measured and expressed in the base frame F, determine whether it is strictly contained in the box (just touching doesn't count).

Cost is about 23 flops.

template<class P>
OrientedBox_& SimTK::Geo::OrientedBox_< P >::stretchBoundary ( )
inline

Stretch this box in place by a small amount to ensure that there will be no roundoff problems if this is used as a bounding box.

The amount to stretch depends on the default tolerance for this precision, the dimensions, and the position of the box in space. A very large box, or a box that is very far from the origin, must be stretched more than a small one at the origin. Cost is 6 flops.

See also
Geo class for tolerance information.

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