All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BulletRaySensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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: Bullet ray sensor
18  * Author: Nate Koenig
19  * Date: 21 May 2009
20  */
21 
22 #ifndef BULLETRAYSENSOR_HH
23 #define BULLETRAYSENSOR_HH
24 
25 #include <vector>
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace physics
31  {
32  class BulletRayCollision;
33  class BulletLink;
34 
38 
40  class GAZEBO_VISIBLE BulletRaySensor : public PhysicsRaySensor
41  {
43  public: BulletRaySensor(Link *body);
44 
46  public: virtual ~BulletRaySensor();
47 
49  public: void AddRay(math::Vector3 start, math::Vector3 end,
50  double minRange, double maxRange, bool display);
51 
53  public: int GetCount() const;
54 
56  public: void GetRelativePoints(int index, math::Vector3 &a,
57  math::Vector3 &b);
58 
60  public: double GetRange(int index) const;
61 
63  public: double GetRetro(int index) const;
64 
66  public: double GetFiducial(int index) const;
67 
69  public: virtual void Update();
70 
72  private: std::vector<BulletRayCollision*> rays;
73 
74  private: BulletLink *body;
75  };
77  }
78 }
79 #endif
80 
81 
An Bullet Ray sensor.
Definition: BulletRaySensor.hh:40
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48