Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
Report Documentation Issues
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
physics
RayShape.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2012 Open Source Robotics Foundation
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
/* Desc: A ray
18
* Author: Nate Koenig
19
* Date: 14 Oct 2009
20
*/
21
22
#ifndef _RAYSHAPE_HH_
23
#define _RAYSHAPE_HH_
24
25
#include <string>
26
27
#include "
gazebo/physics/PhysicsTypes.hh
"
28
#include "
gazebo/physics/Shape.hh
"
29
30
namespace
gazebo
31
{
32
namespace
physics
33
{
36
39
class
RayShape
:
public
Shape
40
{
43
public
:
explicit
RayShape
(
PhysicsEnginePtr
_physicsEngine);
44
47
public
:
explicit
RayShape
(
CollisionPtr
_parent);
48
50
public
:
virtual
~RayShape
();
51
56
public
:
virtual
void
SetPoints
(
const
math::Vector3
&_posStart,
57
const
math::Vector3
&_posEnd);
58
59
63
public
:
virtual
void
GetRelativePoints
(
math::Vector3
&_posA,
64
math::Vector3
&_posB);
65
69
public
:
virtual
void
GetGlobalPoints
(
math::Vector3
&_posA,
70
math::Vector3
&_posB);
71
74
public
:
virtual
void
SetLength
(
double
_len);
75
78
public
:
double
GetLength
()
const
;
79
81
public
:
virtual
void
Update
() = 0;
82
86
public
:
virtual
void
GetIntersection
(
double
&_dist,
87
std::string &_entity) = 0;
88
91
public
:
void
SetRetro
(
float
_retro);
92
95
public
:
float
GetRetro
()
const
;
96
99
public
:
void
SetFiducial
(
int
_fid);
100
103
public
:
int
GetFiducial
()
const
;
104
106
public
:
virtual
void
Init
();
107
111
public
:
void
FillMsg
(msgs::Geometry &_msg);
112
116
public
:
virtual
void
ProcessMsg
(
const
msgs::Geometry &_msg);
117
118
// Contact information; this is filled out during collision
119
// detection.
121
protected
:
double
contactLen
;
123
protected
:
double
contactRetro
;
125
protected
:
int
contactFiducial
;
126
128
protected
:
math::Vector3
relativeStartPos
;
130
protected
:
math::Vector3
relativeEndPos
;
131
133
protected
:
math::Vector3
globalStartPos
;
134
136
protected
:
math::Vector3
globalEndPos
;
137
};
139
}
140
}
141
#endif