All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BulletRaySensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Nate Koenig
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 
27 namespace gazebo
28 {
29  namespace physics
30  {
31  class BulletRayCollision;
32  class BulletLink;
33 
37 
39  class BulletRaySensor : public PhysicsRaySensor
40  {
42  public: BulletRaySensor(Link *body);
43 
45  public: virtual ~BulletRaySensor();
46 
48  public: void AddRay(math::Vector3 start, math::Vector3 end,
49  double minRange, double maxRange, bool display);
50 
52  public: int GetCount() const;
53 
55  public: void GetRelativePoints(int index, math::Vector3 &a,
56  math::Vector3 &b);
57 
59  public: double GetRange(int index) const;
60 
62  public: double GetRetro(int index) const;
63 
65  public: double GetFiducial(int index) const;
66 
68  public: virtual void Update();
69 
71  private: std::vector<BulletRayCollision*> rays;
72 
73  private: BulletLink *body;
74  };
76  }
77 }
78 #endif
79 
80