Simbody
3.4 (development)
|
A 3d box aligned with an unspecified frame F and centered at a given point measured from that frame's origin. More...
#include <Geo_Box.h>
Public Member Functions | |
AlignedBox_ () | |
Construct an uninitialized AlignedBox object; the dimensions and location will be garbage. | |
AlignedBox_ (const Vec3P ¢er, const Geo::Box_< P > &box) | |
Construct an AlignedBox with the given box shape with the center located as given. | |
AlignedBox_ (const Vec3P ¢er, const Vec3P &halfLengths) | |
Construct an AlignedBox with the given center location and half-dimensions. | |
AlignedBox_ & | setCenter (const Vec3P ¢er) |
Change the center location of this box. | |
AlignedBox_ & | setHalfLengths (const Vec3P &halfLengths) |
Change the dimensions of this box. | |
const Vec3P & | getCenter () const |
Return the location of the center of this box (box frame origin). | |
Vec3P & | updCenter () |
Return a writable reference to the center location of this box. | |
const Vec3P & | getHalfLengths () const |
Return the half-lengths of this box as a Vec3 from the center to the first quadrant vertex. | |
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). | |
AlignedBox_ & | 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. |
A 3d box aligned with an unspecified frame F and centered at a given point measured from that frame's origin.
The box frame B is aligned with F but the origin Bo is shifted from Fo.
SimTK::Geo::AlignedBox_< P >::AlignedBox_ | ( | ) | [inline] |
Construct an uninitialized AlignedBox object; the dimensions and location will be garbage.
SimTK::Geo::AlignedBox_< P >::AlignedBox_ | ( | const Vec3P & | center, |
const Geo::Box_< P > & | box | ||
) | [inline] |
Construct an AlignedBox with the given box shape with the center located as given.
SimTK::Geo::AlignedBox_< P >::AlignedBox_ | ( | const Vec3P & | center, |
const Vec3P & | halfLengths | ||
) | [inline] |
Construct an AlignedBox with the given center location and half-dimensions.
AlignedBox_& SimTK::Geo::AlignedBox_< P >::setCenter | ( | const Vec3P & | center | ) | [inline] |
Change the center location of this box.
AlignedBox_& SimTK::Geo::AlignedBox_< P >::setHalfLengths | ( | const Vec3P & | halfLengths | ) | [inline] |
Change the dimensions of this box.
const Vec3P& SimTK::Geo::AlignedBox_< P >::getCenter | ( | ) | const [inline] |
Return the location of the center of this box (box frame origin).
Vec3P& SimTK::Geo::AlignedBox_< P >::updCenter | ( | ) | [inline] |
Return a writable reference to the center location of this box.
const Vec3P& SimTK::Geo::AlignedBox_< P >::getHalfLengths | ( | ) | const [inline] |
Return the half-lengths of this box as a Vec3 from the center to the first quadrant vertex.
const Box_<P>& SimTK::Geo::AlignedBox_< P >::getBox | ( | ) | const [inline] |
Box_<P>& SimTK::Geo::AlignedBox_< P >::updBox | ( | ) | [inline] |
bool SimTK::Geo::AlignedBox_< 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 8 flops.
AlignedBox_& SimTK::Geo::AlignedBox_< 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.