bodies::ConvexMesh Class Reference
Definition of a convex mesh. Convex hull is computed for a given shape::Mesh.
More...
#include <bodies.h>
List of all members.
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 btVector3 &p, bool verbose=false) const |
| Check is a point is inside the body.
|
| ConvexMesh (const shapes::Shape *shape) |
| ConvexMesh (void) |
const std::vector< btVector3 > & | getScaledVertices () const |
const std::vector< unsigned int > & | getTriangles () const |
const std::vector< btVector3 > & | getVertices () const |
virtual bool | intersectsRay (const btVector3 &origin, const btVector3 &dir, std::vector< btVector3 > *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 | ~ConvexMesh (void) |
Protected Member Functions |
unsigned int | countVerticesBehindPlane (const btVector4 &planeNormal) const |
bool | isPointInsidePlanes (const btVector3 &point) const |
virtual void | updateInternalData (void) |
virtual void | useDimensions (const shapes::Shape *shape) |
Protected Attributes |
Box | m_boundingBox |
BoundingCylinder | m_boundingCylinder |
btVector3 | m_boxOffset |
btVector3 | m_center |
btTransform | m_iPose |
btVector3 | m_meshCenter |
double | m_meshRadiusB |
std::vector< btVector4 > | m_planes |
double | m_radiusB |
double | m_radiusBSqr |
std::vector< btVector3 > | m_scaledVertices |
std::vector< unsigned int > | m_triangles |
std::vector< btVector3 > | m_vertices |
Detailed Description
Definition of a convex mesh. Convex hull is computed for a given shape::Mesh.
Definition at line 354 of file bodies.h.
Constructor & Destructor Documentation
bodies::ConvexMesh::ConvexMesh |
( |
void |
|
) |
[inline] |
bodies::ConvexMesh::ConvexMesh |
( |
const shapes::Shape * |
shape |
) |
[inline] |
virtual bodies::ConvexMesh::~ConvexMesh |
( |
void |
|
) |
[inline, virtual] |
Member Function Documentation
void bodies::ConvexMesh::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 956 of file bodies.cpp.
void bodies::ConvexMesh::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 950 of file bodies.cpp.
double bodies::ConvexMesh::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 992 of file bodies.cpp.
bool bodies::ConvexMesh::containsPoint |
( |
const btVector3 & |
p, |
|
|
bool |
verbose = false | |
|
) |
| | const [virtual] |
unsigned int bodies::ConvexMesh::countVerticesBehindPlane |
( |
const btVector4 & |
planeNormal |
) |
const [protected] |
const std::vector<btVector3>& bodies::ConvexMesh::getScaledVertices |
( |
|
) |
const [inline] |
const std::vector<unsigned int>& bodies::ConvexMesh::getTriangles |
( |
|
) |
const [inline] |
const std::vector<btVector3>& bodies::ConvexMesh::getVertices |
( |
|
) |
const [inline] |
bool bodies::ConvexMesh::intersectsRay |
( |
const btVector3 & |
origin, |
|
|
const btVector3 & |
dir, |
|
|
std::vector< btVector3 > * |
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 1005 of file bodies.cpp.
bool bodies::ConvexMesh::isPointInsidePlanes |
( |
const btVector3 & |
point |
) |
const [protected] |
void bodies::ConvexMesh::updateInternalData |
( |
void |
|
) |
[protected, virtual] |
void bodies::ConvexMesh::useDimensions |
( |
const shapes::Shape * |
shape |
) |
[protected, virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: