Definition of a box. More...
#include <bodies.h>
Public Member Functions | |
Box (void) | |
Box (const shapes::Shape *shape) | |
virtual void | computeBoundingCylinder (BoundingCylinder &cylinder) const |
Compute the bounding cylinder for the body, in its current pose. Scaling and padding are accounted for. | |
virtual void | computeBoundingSphere (BoundingSphere &sphere) const |
Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for. | |
virtual double | computeVolume (void) const |
Compute the volume of the body. This method includes changes induced by scaling and padding. | |
virtual bool | containsPoint (const tf::Vector3 &p, bool verbose=false) const |
Check is a point is inside the body. | |
virtual bool | intersectsRay (const tf::Vector3 &origin, const tf::Vector3 &dir, std::vector< tf::Vector3 > *intersections=NULL, unsigned int count=0) const |
Check is a ray intersects the body, and find the set of intersections, in order, along the ray. A maximum number of intersections can be specified as well. If that number is 0, all intersections are returned. | |
virtual | ~Box (void) |
Protected Member Functions | |
virtual void | updateInternalData (void) |
virtual void | useDimensions (const shapes::Shape *shape) |
Protected Attributes | |
tf::Vector3 | m_center |
tf::Vector3 | m_corner1 |
tf::Vector3 | m_corner2 |
double | m_height |
double | m_height2 |
double | m_length |
double | m_length2 |
tf::Vector3 | m_normalH |
tf::Vector3 | m_normalL |
tf::Vector3 | m_normalW |
double | m_radius2 |
double | m_radiusB |
double | m_width |
double | m_width2 |
bodies::Box::Box | ( | void | ) | [inline] |
bodies::Box::Box | ( | const shapes::Shape * | shape | ) | [inline] |
virtual bodies::Box::~Box | ( | void | ) | [inline, virtual] |
void bodies::Box::computeBoundingCylinder | ( | BoundingCylinder & | cylinder | ) | const [virtual] |
Compute the bounding cylinder for the body, in its current pose. Scaling and padding are accounted for.
Implements bodies::Body.
Definition at line 484 of file bodies.cpp.
void bodies::Box::computeBoundingSphere | ( | BoundingSphere & | sphere | ) | const [virtual] |
Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for.
Implements bodies::Body.
Definition at line 478 of file bodies.cpp.
double bodies::Box::computeVolume | ( | void | ) | const [virtual] |
Compute the volume of the body. This method includes changes induced by scaling and padding.
Implements bodies::Body.
Definition at line 473 of file bodies.cpp.
bool bodies::Box::containsPoint | ( | const tf::Vector3 & | p, |
bool | verbose = false |
||
) | const [virtual] |
Check is a point is inside the body.
Implements bodies::Body.
Definition at line 420 of file bodies.cpp.
bool bodies::Box::intersectsRay | ( | const tf::Vector3 & | origin, |
const tf::Vector3 & | dir, | ||
std::vector< tf::Vector3 > * | intersections = NULL , |
||
unsigned int | count = 0 |
||
) | const [virtual] |
Check is a ray intersects the body, and find the set of intersections, in order, along the ray. A maximum number of intersections can be specified as well. If that number is 0, all intersections are returned.
Implements bodies::Body.
Definition at line 511 of file bodies.cpp.
void bodies::Box::updateInternalData | ( | void | ) | [protected, virtual] |
Implements bodies::Body.
Definition at line 451 of file bodies.cpp.
void bodies::Box::useDimensions | ( | const shapes::Shape * | shape | ) | [protected, virtual] |
Implements bodies::Body.
Definition at line 443 of file bodies.cpp.
tf::Vector3 bodies::Box::m_center [protected] |
tf::Vector3 bodies::Box::m_corner1 [protected] |
tf::Vector3 bodies::Box::m_corner2 [protected] |
double bodies::Box::m_height [protected] |
double bodies::Box::m_height2 [protected] |
double bodies::Box::m_length [protected] |
double bodies::Box::m_length2 [protected] |
tf::Vector3 bodies::Box::m_normalH [protected] |
tf::Vector3 bodies::Box::m_normalL [protected] |
tf::Vector3 bodies::Box::m_normalW [protected] |
double bodies::Box::m_radius2 [protected] |
double bodies::Box::m_radiusB [protected] |
double bodies::Box::m_width [protected] |
double bodies::Box::m_width2 [protected] |