Public Member Functions | Protected Attributes
RayShape Class Reference

Ray collision. More...

#include <RayShape.hh>

Inheritance diagram for RayShape:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 RayShape (PhysicsEnginePtr _physicsEngine)
 Constructor for a global ray.
 RayShape (CollisionPtr parent, bool displayRays)
 Constructor.
virtual ~RayShape ()
 Destructor.
virtual void SetPoints (const math::Vector3 &posStart, const math::Vector3 &posEnd)
 Set the ray based on starting and ending points relative to the body.
virtual void GetRelativePoints (math::Vector3 &posA, math::Vector3 &posB)
 Get the relative starting and ending points.
virtual void GetGlobalPoints (math::Vector3 &posA, math::Vector3 &posB)
 Get the global starting and ending points.
virtual void SetLength (double len)
 Set the length of the ray.
double GetLength () const
 Get the length of the ray.
virtual void Update ()=0
 Update the ray collision.
virtual void GetIntersection (double &_dist, std::string &_entity)=0
 Get the nearest intersection.
void SetRetro (float retro)
 Set the retro-reflectivness detected by this ray.
float GetRetro () const
 Get the retro-reflectivness detected by this ray.
void SetFiducial (int fid)
 Set the fiducial id detected by this ray.
int GetFiducial () const
 Get the fiducial id detected by this ray.
virtual void Load (sdf::ElementPtr &_sdf)
 Load the ray.
virtual void Init ()
 In the ray.
void FillShapeMsg (msgs::Geometry &)
virtual void ProcessMsg (const msgs::Geometry &)

Protected Attributes

double contactLen
 Contact information; this is filled out during collision detection.
double contactRetro
int contactFiducial
math::Vector3 relativeStartPos
 Start and end positions of the ray, relative to the body.
math::Vector3 relativeEndPos
math::Vector3 globalStartPos
 Start and end positions of the ray in global cs.
math::Vector3 globalEndPos

Detailed Description

Ray collision.


Constructor & Destructor Documentation

RayShape ( CollisionPtr  parent,
bool  displayRays 
)

Constructor.

Parameters:
bodyLink the ray is attached to
displayRaysIndicates if the rays should be displayed when rendering images

Member Function Documentation

virtual void GetGlobalPoints ( math::Vector3 posA,
math::Vector3 posB 
) [virtual]

Get the global starting and ending points.

Parameters:
posAReturns the starting point
posBReturns the ending point
virtual void GetRelativePoints ( math::Vector3 posA,
math::Vector3 posB 
) [virtual]

Get the relative starting and ending points.

Parameters:
posAReturns the starting point
posBReturns the ending point
virtual void SetLength ( double  len) [virtual]

Set the length of the ray.

Parameters:
lenLength of the array
virtual void SetPoints ( const math::Vector3 posStart,
const math::Vector3 posEnd 
) [virtual]

Set the ray based on starting and ending points relative to the body.

Parameters:
posStartStart position, relative the body
posEndEnd position, relative to the body

Reimplemented in ODERayShape.


Member Data Documentation

double contactLen [protected]

Contact information; this is filled out during collision detection.


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