Go to the documentation of this file.
17 #ifndef GAZEBO_PHYSICS_RAYSHAPE_HH_
18 #define GAZEBO_PHYSICS_RAYSHAPE_HH_
52 public:
virtual void SetPoints(
const ignition::math::Vector3d &_posStart,
53 const ignition::math::Vector3d &_posEnd);
57 public: ignition::math::Vector3d Start()
const;
61 public: ignition::math::Vector3d End()
const;
66 public:
virtual void RelativePoints(ignition::math::Vector3d &_posA,
67 ignition::math::Vector3d &_posB);
72 public:
virtual void GlobalPoints(ignition::math::Vector3d &_posA,
73 ignition::math::Vector3d &_posB);
77 public:
virtual void SetLength(
double _len);
81 public:
double GetLength()
const;
84 public:
virtual void SetScale(
const ignition::math::Vector3d &_scale);
87 public:
virtual void Update() = 0;
92 public:
virtual void GetIntersection(
double &_dist,
93 std::string &_entity) = 0;
97 public:
void SetRetro(
float _retro);
101 public: std::string CollisionName()
const;
105 public:
float GetRetro()
const;
109 public:
void SetFiducial(
int _fid);
113 public:
int GetFiducial()
const;
116 public:
virtual void Init();
121 public:
void FillMsg(msgs::Geometry &_msg);
126 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
129 public:
virtual double ComputeVolume()
const;
136 protected:
void SetCollisionName(
const std::string &_name);
162 private: std::string collisionName;
ignition::math::Vector3d globalEndPos
End position of the ray in global cs.
Definition: RayShape.hh:159
RayShape(PhysicsEnginePtr _physicsEngine)
Constructor for a global ray.
ignition::math::Vector3d End() const
Get the end point.
double contactLen
Length of the ray.
Definition: RayShape.hh:141
virtual void SetLength(double _len)
Set the length of the ray.
virtual void Update()=0
Update the ray collision.
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual double ComputeVolume() const
Documentation inherited.
ODE specific version of MultiRayShape.
Definition: ODEMultiRayShape.hh:31
void FillMsg(msgs::Geometry &_msg)
Fill a message with data from this object.
double GetLength() const
Get the length of the ray.
virtual void SetScale(const ignition::math::Vector3d &_scale)
Set the scale of the ray.
virtual void ProcessMsg(const msgs::Geometry &_msg)
Update this shape from a message.
default namespace for gazebo
void SetFiducial(int _fid)
Set the fiducial id detected by this ray.
ignition::math::Vector3d relativeStartPos
Start position of the ray, relative to the body.
Definition: RayShape.hh:150
virtual void Init()
In the ray.
double contactRetro
Retro reflectance value.
Definition: RayShape.hh:144
virtual void GetIntersection(double &_dist, std::string &_entity)=0
Get the nearest intersection.
virtual ~RayShape()
Destructor.
ignition::math::Vector3d relativeEndPos
End position of the ray, relative to the body.
Definition: RayShape.hh:153
float GetRetro() const
Get the retro-reflectivness detected by this ray.
Base class for Ray collision geometry.
Definition: RayShape.hh:35
void SetCollisionName(const std::string &_name)
Set the name of the object this ray has collided with.
virtual void SetPoints(const ignition::math::Vector3d &_posStart, const ignition::math::Vector3d &_posEnd)
Set the ray based on starting and ending points relative to the body.
ignition::math::Vector3d globalStartPos
Start position of the ray in global cs.
Definition: RayShape.hh:156
int GetFiducial() const
Get the fiducial id detected by this ray.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
int contactFiducial
Fiducial ID value.
Definition: RayShape.hh:147
std::string CollisionName() const
Get the name of the object this ray collided with.
virtual void GlobalPoints(ignition::math::Vector3d &_posA, ignition::math::Vector3d &_posB)
Get the global starting and ending points.
void SetRetro(float _retro)
Set the retro-reflectivness detected by this ray.
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
ignition::math::Vector3d Start() const
Get the start point.
virtual void RelativePoints(ignition::math::Vector3d &_posA, ignition::math::Vector3d &_posB)
Get the relative starting and ending points.
Base class for all shapes.
Definition: Shape.hh:45