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

Definition of a box. More...

#include <bodies.h>

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

Public Member Functions

 Box (void)
 
 Box (const shapes::Shape *shape)
 
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...
 
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 ~Box (void)
 
- Public Member Functions inherited from robot_self_filter::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

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
 
- Protected Attributes inherited from robot_self_filter::bodies::Body
double m_padding
 
tf::Transform m_pose
 
double m_scale
 
shapes::ShapeType m_type
 

Detailed Description

Definition of a box.

Definition at line 255 of file bodies.h.

Constructor & Destructor Documentation

robot_self_filter::bodies::Box::Box ( void  )
inline

Definition at line 258 of file bodies.h.

robot_self_filter::bodies::Box::Box ( const shapes::Shape shape)
inline

Definition at line 263 of file bodies.h.

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

Definition at line 269 of file bodies.h.

Member Function Documentation

void robot_self_filter::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 robot_self_filter::bodies::Body.

Definition at line 441 of file bodies.cpp.

double robot_self_filter::bodies::Box::computeVolume ( void  ) const
virtual

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

Implements robot_self_filter::bodies::Body.

Definition at line 436 of file bodies.cpp.

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

Check is a point is inside the body.

Implements robot_self_filter::bodies::Body.

Definition at line 383 of file bodies.cpp.

bool robot_self_filter::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 robot_self_filter::bodies::Body.

Definition at line 447 of file bodies.cpp.

void robot_self_filter::bodies::Box::updateInternalData ( void  )
protectedvirtual

Implements robot_self_filter::bodies::Body.

Definition at line 414 of file bodies.cpp.

void robot_self_filter::bodies::Box::useDimensions ( const shapes::Shape shape)
protectedvirtual

Implements robot_self_filter::bodies::Body.

Definition at line 406 of file bodies.cpp.

Member Data Documentation

tf::Vector3 robot_self_filter::bodies::Box::m_center
protected

Definition at line 283 of file bodies.h.

tf::Vector3 robot_self_filter::bodies::Box::m_corner1
protected

Definition at line 288 of file bodies.h.

tf::Vector3 robot_self_filter::bodies::Box::m_corner2
protected

Definition at line 289 of file bodies.h.

double robot_self_filter::bodies::Box::m_height
protected

Definition at line 293 of file bodies.h.

double robot_self_filter::bodies::Box::m_height2
protected

Definition at line 296 of file bodies.h.

double robot_self_filter::bodies::Box::m_length
protected

Definition at line 291 of file bodies.h.

double robot_self_filter::bodies::Box::m_length2
protected

Definition at line 294 of file bodies.h.

tf::Vector3 robot_self_filter::bodies::Box::m_normalH
protected

Definition at line 286 of file bodies.h.

tf::Vector3 robot_self_filter::bodies::Box::m_normalL
protected

Definition at line 284 of file bodies.h.

tf::Vector3 robot_self_filter::bodies::Box::m_normalW
protected

Definition at line 285 of file bodies.h.

double robot_self_filter::bodies::Box::m_radius2
protected

Definition at line 298 of file bodies.h.

double robot_self_filter::bodies::Box::m_radiusB
protected

Definition at line 297 of file bodies.h.

double robot_self_filter::bodies::Box::m_width
protected

Definition at line 292 of file bodies.h.

double robot_self_filter::bodies::Box::m_width2
protected

Definition at line 295 of file bodies.h.


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


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