Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bodies::ConvexMesh Class Reference

Definition of a convex mesh. Convex hull is computed for a given shape::Mesh. More...

#include <bodies.h>

Inheritance diagram for bodies::ConvexMesh:
Inheritance graph
[legend]

Public Member Functions

virtual void computeBoundingSphere (BoundingSphere &sphere) const
 Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for. More...
 
virtual double computeVolume (void) const
 Compute the volume of the body. This method includes changes induced by scaling and padding. More...
 
virtual bool containsPoint (const tf::Vector3 &p, bool verbose=false) const
 Check is a point is inside the body. More...
 
 ConvexMesh (void)
 
 ConvexMesh (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. More...
 
virtual ~ConvexMesh (void)
 
- Public Member Functions inherited from bodies::Body
 Body (void)
 
bool containsPoint (double x, double y, double z) const
 Check is a point is inside the body. More...
 
double getPadding (void) const
 Retrieve the current padding. More...
 
const tf::TransformgetPose (void) const
 Retrieve the pose of the body. More...
 
double getScale (void) const
 Retrieve the current scale. More...
 
shapes::ShapeType getType (void) const
 Get the type of shape this body represents. More...
 
void setDimensions (const shapes::Shape *shape)
 Set the dimensions of the body (from corresponding shape) More...
 
void setPadding (double padd)
 If constant padding should be added to the body, this method sets the padding. Default is 0.0. More...
 
void setPose (const tf::Transform &pose)
 Set the pose of the body. Default is identity. More...
 
void setScale (double scale)
 If the dimension of the body should be scaled, this method sets the scale. Default is 1.0. More...
 
virtual ~Body (void)
 

Protected Member Functions

unsigned int countVerticesBehindPlane (const tf::tfVector4 &planeNormal) const
 
bool isPointInsidePlanes (const tf::Vector3 &point) const
 
virtual void updateInternalData (void)
 
virtual void useDimensions (const shapes::Shape *shape)
 

Protected Attributes

Box m_boundingBox
 
tf::Vector3 m_boxOffset
 
tf::Vector3 m_center
 
tf::Transform m_iPose
 
tf::Vector3 m_meshCenter
 
double m_meshRadiusB
 
std::vector< tf::tfVector4m_planes
 
double m_radiusB
 
double m_radiusBSqr
 
std::vector< tf::Vector3m_scaledVertices
 
std::vector< unsigned int > m_triangles
 
std::vector< tf::Vector3m_vertices
 
- Protected Attributes inherited from bodies::Body
double m_padding
 
tf::Transform m_pose
 
double m_scale
 
shapes::ShapeType m_type
 

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

Definition at line 358 of file bodies.h.

bodies::ConvexMesh::ConvexMesh ( const shapes::Shape shape)
inline

Definition at line 363 of file bodies.h.

virtual bodies::ConvexMesh::~ConvexMesh ( void  )
inlinevirtual

Definition at line 369 of file bodies.h.

Member Function Documentation

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 863 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 895 of file bodies.cpp.

bool bodies::ConvexMesh::containsPoint ( const tf::Vector3 p,
bool  verbose = false 
) const
virtual

Check is a point is inside the body.

Implements bodies::Body.

Definition at line 706 of file bodies.cpp.

unsigned int bodies::ConvexMesh::countVerticesBehindPlane ( const tf::tfVector4 planeNormal) const
protected

Definition at line 882 of file bodies.cpp.

bool bodies::ConvexMesh::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 908 of file bodies.cpp.

bool bodies::ConvexMesh::isPointInsidePlanes ( const tf::Vector3 point) const
protected

Definition at line 869 of file bodies.cpp.

void bodies::ConvexMesh::updateInternalData ( void  )
protectedvirtual

Implements bodies::Body.

Definition at line 841 of file bodies.cpp.

void bodies::ConvexMesh::useDimensions ( const shapes::Shape shape)
protectedvirtual

Implements bodies::Body.

Definition at line 718 of file bodies.cpp.

Member Data Documentation

Box bodies::ConvexMesh::m_boundingBox
protected

Definition at line 400 of file bodies.h.

tf::Vector3 bodies::ConvexMesh::m_boxOffset
protected

Definition at line 399 of file bodies.h.

tf::Vector3 bodies::ConvexMesh::m_center
protected

Definition at line 393 of file bodies.h.

tf::Transform bodies::ConvexMesh::m_iPose
protected

Definition at line 391 of file bodies.h.

tf::Vector3 bodies::ConvexMesh::m_meshCenter
protected

Definition at line 394 of file bodies.h.

double bodies::ConvexMesh::m_meshRadiusB
protected

Definition at line 397 of file bodies.h.

std::vector<tf::tfVector4> bodies::ConvexMesh::m_planes
protected

Definition at line 387 of file bodies.h.

double bodies::ConvexMesh::m_radiusB
protected

Definition at line 395 of file bodies.h.

double bodies::ConvexMesh::m_radiusBSqr
protected

Definition at line 396 of file bodies.h.

std::vector<tf::Vector3> bodies::ConvexMesh::m_scaledVertices
protected

Definition at line 389 of file bodies.h.

std::vector<unsigned int> bodies::ConvexMesh::m_triangles
protected

Definition at line 390 of file bodies.h.

std::vector<tf::Vector3> bodies::ConvexMesh::m_vertices
protected

Definition at line 388 of file bodies.h.


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


pr2_navigation_self_filter
Author(s): Eitan Marder-Eppstein
autogenerated on Mon Jun 10 2019 14:28:54