Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
robot_self_filter::bodies::Body Class Referenceabstract

A body is a shape + its pose. Point inclusion, ray intersection can be tested, volumes and bounding spheres can be computed. More...

#include <bodies.h>

Inheritance diagram for robot_self_filter::bodies::Body:
Inheritance graph
[legend]

Public Member Functions

 Body (void)
 
virtual void computeBoundingSphere (BoundingSphere &sphere) const =0
 Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for. More...
 
virtual double computeVolume (void) const =0
 Compute the volume of the body. This method includes changes induced by scaling and padding. More...
 
bool containsPoint (double x, double y, double z) const
 Check is a point is inside the body. More...
 
virtual bool containsPoint (const tf::Vector3 &p, bool verbose=false) const =0
 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...
 
virtual bool intersectsRay (const tf::Vector3 &origin, const tf::Vector3 &dir, std::vector< tf::Vector3 > *intersections=NULL, unsigned int count=0) const =0
 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...
 
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

virtual void updateInternalData (void)=0
 
virtual void useDimensions (const shapes::Shape *shape)=0
 

Protected Attributes

double m_padding
 
tf::Transform m_pose
 
double m_scale
 
shapes::ShapeType m_type
 

Detailed Description

A body is a shape + its pose. Point inclusion, ray intersection can be tested, volumes and bounding spheres can be computed.

Definition at line 70 of file bodies.h.

Constructor & Destructor Documentation

robot_self_filter::bodies::Body::Body ( void  )
inline

Definition at line 74 of file bodies.h.

virtual robot_self_filter::bodies::Body::~Body ( void  )
inlinevirtual

Definition at line 82 of file bodies.h.

Member Function Documentation

virtual void robot_self_filter::bodies::Body::computeBoundingSphere ( BoundingSphere sphere) const
pure virtual

Compute the bounding radius for the body, in its current pose. Scaling and padding are accounted for.

Implemented in robot_self_filter::bodies::ConvexMesh, robot_self_filter::bodies::Box, robot_self_filter::bodies::Cylinder, and robot_self_filter::bodies::Sphere.

virtual double robot_self_filter::bodies::Body::computeVolume ( void  ) const
pure virtual

Compute the volume of the body. This method includes changes induced by scaling and padding.

Implemented in robot_self_filter::bodies::ConvexMesh, robot_self_filter::bodies::Box, robot_self_filter::bodies::Cylinder, and robot_self_filter::bodies::Sphere.

bool robot_self_filter::bodies::Body::containsPoint ( double  x,
double  y,
double  z 
) const
inline

Check is a point is inside the body.

Definition at line 141 of file bodies.h.

virtual bool robot_self_filter::bodies::Body::containsPoint ( const tf::Vector3 p,
bool  verbose = false 
) const
pure virtual
double robot_self_filter::bodies::Body::getPadding ( void  ) const
inline

Retrieve the current padding.

Definition at line 115 of file bodies.h.

const tf::Transform& robot_self_filter::bodies::Body::getPose ( void  ) const
inline

Retrieve the pose of the body.

Definition at line 128 of file bodies.h.

double robot_self_filter::bodies::Body::getScale ( void  ) const
inline

Retrieve the current scale.

Definition at line 101 of file bodies.h.

shapes::ShapeType robot_self_filter::bodies::Body::getType ( void  ) const
inline

Get the type of shape this body represents.

Definition at line 87 of file bodies.h.

virtual bool robot_self_filter::bodies::Body::intersectsRay ( const tf::Vector3 origin,
const tf::Vector3 dir,
std::vector< tf::Vector3 > *  intersections = NULL,
unsigned int  count = 0 
) const
pure 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.

Implemented in robot_self_filter::bodies::ConvexMesh, robot_self_filter::bodies::Box, robot_self_filter::bodies::Cylinder, and robot_self_filter::bodies::Sphere.

void robot_self_filter::bodies::Body::setDimensions ( const shapes::Shape shape)
inline

Set the dimensions of the body (from corresponding shape)

Definition at line 134 of file bodies.h.

void robot_self_filter::bodies::Body::setPadding ( double  padd)
inline

If constant padding should be added to the body, this method sets the padding. Default is 0.0.

Definition at line 108 of file bodies.h.

void robot_self_filter::bodies::Body::setPose ( const tf::Transform pose)
inline

Set the pose of the body. Default is identity.

Definition at line 121 of file bodies.h.

void robot_self_filter::bodies::Body::setScale ( double  scale)
inline

If the dimension of the body should be scaled, this method sets the scale. Default is 1.0.

Definition at line 94 of file bodies.h.

virtual void robot_self_filter::bodies::Body::updateInternalData ( void  )
protectedpure virtual
virtual void robot_self_filter::bodies::Body::useDimensions ( const shapes::Shape shape)
protectedpure virtual

Member Data Documentation

double robot_self_filter::bodies::Body::m_padding
protected

Definition at line 171 of file bodies.h.

tf::Transform robot_self_filter::bodies::Body::m_pose
protected

Definition at line 169 of file bodies.h.

double robot_self_filter::bodies::Body::m_scale
protected

Definition at line 170 of file bodies.h.

shapes::ShapeType robot_self_filter::bodies::Body::m_type
protected

Definition at line 168 of file bodies.h.


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


robot_self_filter
Author(s): Eitan Marder-Eppstein
autogenerated on Thu Jun 6 2019 19:59:05