Definition of a cylinder. More...
#include <bodies.h>
Public Member Functions | |
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. | |
Cylinder (void) | |
Cylinder (const shapes::Shape *shape) | |
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 | ~Cylinder (void) |
Protected Member Functions | |
virtual void | updateInternalData (void) |
virtual void | useDimensions (const shapes::Shape *shape) |
Protected Attributes | |
tf::Vector3 | m_center |
double | m_d1 |
double | m_d2 |
double | m_length |
double | m_length2 |
tf::Vector3 | m_normalB1 |
tf::Vector3 | m_normalB2 |
tf::Vector3 | m_normalH |
double | m_radius |
double | m_radius2 |
double | m_radiusB |
double | m_radiusBSqr |
double | m_radiusU |
bodies::Cylinder::Cylinder | ( | void | ) | [inline] |
bodies::Cylinder::Cylinder | ( | const shapes::Shape * | shape | ) | [inline] |
virtual bodies::Cylinder::~Cylinder | ( | void | ) | [inline, virtual] |
void bodies::Cylinder::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 310 of file bodies.cpp.
void bodies::Cylinder::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 304 of file bodies.cpp.
double bodies::Cylinder::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 299 of file bodies.cpp.
bool bodies::Cylinder::containsPoint | ( | const tf::Vector3 & | p, |
bool | verbose = false |
||
) | const [virtual] |
Check is a point is inside the body.
Implements bodies::Body.
Definition at line 254 of file bodies.cpp.
bool bodies::Cylinder::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 317 of file bodies.cpp.
void bodies::Cylinder::updateInternalData | ( | void | ) | [protected, virtual] |
Implements bodies::Body.
Definition at line 280 of file bodies.cpp.
void bodies::Cylinder::useDimensions | ( | const shapes::Shape * | shape | ) | [protected, virtual] |
Implements bodies::Body.
Definition at line 274 of file bodies.cpp.
tf::Vector3 bodies::Cylinder::m_center [protected] |
double bodies::Cylinder::m_d1 [protected] |
double bodies::Cylinder::m_d2 [protected] |
double bodies::Cylinder::m_length [protected] |
double bodies::Cylinder::m_length2 [protected] |
tf::Vector3 bodies::Cylinder::m_normalB1 [protected] |
tf::Vector3 bodies::Cylinder::m_normalB2 [protected] |
tf::Vector3 bodies::Cylinder::m_normalH [protected] |
double bodies::Cylinder::m_radius [protected] |
double bodies::Cylinder::m_radius2 [protected] |
double bodies::Cylinder::m_radiusB [protected] |
double bodies::Cylinder::m_radiusBSqr [protected] |
double bodies::Cylinder::m_radiusU [protected] |