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

Definition of a cylinder. More...

#include <bodies.h>

Inheritance diagram for bodies::Cylinder:
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...
 
 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. More...
 
virtual ~Cylinder (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

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
 
- 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 cylinder.

Definition at line 209 of file bodies.h.

Constructor & Destructor Documentation

bodies::Cylinder::Cylinder ( void  )
inline

Definition at line 212 of file bodies.h.

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

Definition at line 217 of file bodies.h.

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

Definition at line 223 of file bodies.h.

Member Function Documentation

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 272 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 267 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 222 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 278 of file bodies.cpp.

void bodies::Cylinder::updateInternalData ( void  )
protectedvirtual

Implements bodies::Body.

Definition at line 248 of file bodies.cpp.

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

Implements bodies::Body.

Definition at line 242 of file bodies.cpp.

Member Data Documentation

tf::Vector3 bodies::Cylinder::m_center
protected

Definition at line 237 of file bodies.h.

double bodies::Cylinder::m_d1
protected

Definition at line 249 of file bodies.h.

double bodies::Cylinder::m_d2
protected

Definition at line 250 of file bodies.h.

double bodies::Cylinder::m_length
protected

Definition at line 242 of file bodies.h.

double bodies::Cylinder::m_length2
protected

Definition at line 243 of file bodies.h.

tf::Vector3 bodies::Cylinder::m_normalB1
protected

Definition at line 239 of file bodies.h.

tf::Vector3 bodies::Cylinder::m_normalB2
protected

Definition at line 240 of file bodies.h.

tf::Vector3 bodies::Cylinder::m_normalH
protected

Definition at line 238 of file bodies.h.

double bodies::Cylinder::m_radius
protected

Definition at line 244 of file bodies.h.

double bodies::Cylinder::m_radius2
protected

Definition at line 248 of file bodies.h.

double bodies::Cylinder::m_radiusB
protected

Definition at line 246 of file bodies.h.

double bodies::Cylinder::m_radiusBSqr
protected

Definition at line 247 of file bodies.h.

double bodies::Cylinder::m_radiusU
protected

Definition at line 245 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