PhysicsTypes.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 #ifndef _PHYSICSTYPES_HH_
18 #define _PHYSICSTYPES_HH_
19 
20 #include <vector>
21 #include <map>
22 #include <string>
23 #include <boost/shared_ptr.hpp>
24 #include "gazebo/util/system.hh"
25 
29 namespace gazebo
30 {
32  namespace physics
33  {
34  class Base;
35  class Entity;
36  class World;
37  class Model;
38  class Actor;
39  class Light;
40  class Link;
41  class Collision;
42  class FrictionPyramid;
43  class Gripper;
44  class Joint;
45  class JointController;
46  class Contact;
47  class PresetManager;
48  class UserCmd;
49  class UserCmdManager;
50  class PhysicsEngine;
51  class Mass;
52  class Road;
53  class Shape;
54  class RayShape;
55  class MultiRayShape;
56  class Inertial;
57  class SurfaceParams;
58  class BoxShape;
59  class CylinderShape;
60  class MeshShape;
61  class SphereShape;
62  class PlaneShape;
63  class HeightmapShape;
64  class PolylineShape;
65  class ModelState;
66  class LightState;
67  class LinkState;
68  class JointState;
69 
72  typedef boost::shared_ptr<Base> BasePtr;
73 
76  typedef boost::shared_ptr<Contact> ContactPtr;
77 
80  typedef boost::shared_ptr<Entity> EntityPtr;
81 
84  typedef boost::shared_ptr<World> WorldPtr;
85 
88  typedef boost::shared_ptr<Model> ModelPtr;
89 
92  typedef boost::shared_ptr<Actor> ActorPtr;
93 
96  typedef boost::shared_ptr<Light> LightPtr;
97 
100  typedef boost::shared_ptr<Link> LinkPtr;
101 
104  typedef boost::shared_ptr<Collision> CollisionPtr;
105 
108  typedef boost::shared_ptr<Joint> JointPtr;
109 
112  typedef boost::shared_ptr<JointController> JointControllerPtr;
113 
116  typedef boost::shared_ptr<PhysicsEngine> PhysicsEnginePtr;
117 
120  typedef boost::shared_ptr<PresetManager> PresetManagerPtr;
121 
124  typedef std::shared_ptr<UserCmd> UserCmdPtr;
125 
128  typedef std::shared_ptr<UserCmdManager> UserCmdManagerPtr;
129 
132  typedef boost::shared_ptr<Shape> ShapePtr;
133 
136  typedef boost::shared_ptr<RayShape> RayShapePtr;
137 
140  typedef boost::shared_ptr<HeightmapShape> HeightmapShapePtr;
141 
144  typedef boost::shared_ptr<MultiRayShape> MultiRayShapePtr;
145 
148  typedef boost::shared_ptr<Inertial> InertialPtr;
149 
152  typedef boost::shared_ptr<Road> RoadPtr;
153 
156  typedef boost::shared_ptr<FrictionPyramid> FrictionPyramidPtr;
157 
160  typedef boost::shared_ptr<SurfaceParams> SurfaceParamsPtr;
161 
164  typedef boost::shared_ptr<BoxShape> BoxShapePtr;
165 
168  typedef boost::shared_ptr<CylinderShape> CylinderShapePtr;
169 
172  typedef boost::shared_ptr<PlaneShape> PlaneShapePtr;
173 
176  typedef boost::shared_ptr<MeshShape> MeshShapePtr;
177 
180  typedef boost::shared_ptr<PolylineShape> PolylineShapePtr;
181 
184  typedef boost::shared_ptr<SphereShape> SphereShapePtr;
185 
188  typedef boost::shared_ptr<Gripper> GripperPtr;
189 
192  typedef std::vector<BasePtr> Base_V;
193 
196  typedef std::vector<ModelPtr> Model_V;
197 
200  typedef std::vector<ActorPtr> Actor_V;
201 
204  typedef std::vector<JointPtr> Joint_V;
205 
208  typedef std::vector<JointControllerPtr> JointController_V;
209 
212  typedef std::vector<LightPtr> Light_V;
213 
216  typedef std::vector<LinkPtr> Link_V;
217 
220  typedef std::vector<CollisionPtr> Collision_V;
221 
224  typedef std::map<std::string, ModelState> ModelState_M;
225 
228  typedef std::map<std::string, LightState> LightState_M;
229 
232  typedef std::map<std::string, LinkState> LinkState_M;
233 
236  typedef std::map<std::string, JointState> JointState_M;
237 
238  #ifndef GZ_COLLIDE_BITS
239 
243  #define GZ_ALL_COLLIDE 0x0FFFFFFF
244 
247  #define GZ_NONE_COLLIDE 0x00000000
248 
251  #define GZ_FIXED_COLLIDE 0x00000001
252 
255  #define GZ_SENSOR_COLLIDE 0x00000002
256 
259  #define GZ_GHOST_COLLIDE 0x10000000
260 
261  #endif
262  }
263 }
264 #endif
boost::shared_ptr< Actor > ActorPtr
Definition: PhysicsTypes.hh:92
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:100
std::shared_ptr< UserCmd > UserCmdPtr
Definition: PhysicsTypes.hh:124
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:84
boost::shared_ptr< PresetManager > PresetManagerPtr
Definition: PhysicsTypes.hh:120
boost::shared_ptr< FrictionPyramid > FrictionPyramidPtr
Definition: PhysicsTypes.hh:156
Forward declarations for the common classes.
Definition: Animation.hh:33
std::map< std::string, ModelState > ModelState_M
Definition: PhysicsTypes.hh:224
std::vector< ModelPtr > Model_V
Definition: PhysicsTypes.hh:196
boost::shared_ptr< SphereShape > SphereShapePtr
Definition: PhysicsTypes.hh:184
boost::shared_ptr< PolylineShape > PolylineShapePtr
Definition: PhysicsTypes.hh:180
std::vector< LightPtr > Light_V
Definition: PhysicsTypes.hh:212
std::map< std::string, JointState > JointState_M
Definition: PhysicsTypes.hh:236
std::shared_ptr< UserCmdManager > UserCmdManagerPtr
Definition: PhysicsTypes.hh:128
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:108
std::vector< JointControllerPtr > JointController_V
Definition: PhysicsTypes.hh:208
boost::shared_ptr< SurfaceParams > SurfaceParamsPtr
Definition: PhysicsTypes.hh:160
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:116
std::map< std::string, LightState > LightState_M
Definition: PhysicsTypes.hh:228
boost::shared_ptr< PlaneShape > PlaneShapePtr
Definition: PhysicsTypes.hh:172
boost::shared_ptr< CylinderShape > CylinderShapePtr
Definition: PhysicsTypes.hh:168
boost::shared_ptr< MultiRayShape > MultiRayShapePtr
Definition: PhysicsTypes.hh:144
boost::shared_ptr< Gripper > GripperPtr
Definition: PhysicsTypes.hh:188
Used to render a strip of road.
std::vector< JointPtr > Joint_V
Definition: PhysicsTypes.hh:204
boost::shared_ptr< HeightmapShape > HeightmapShapePtr
Definition: PhysicsTypes.hh:140
std::vector< CollisionPtr > Collision_V
Definition: PhysicsTypes.hh:220
boost::shared_ptr< Contact > ContactPtr
Definition: PhysicsTypes.hh:76
boost::shared_ptr< Inertial > InertialPtr
Definition: PhysicsTypes.hh:148
std::vector< BasePtr > Base_V
Definition: PhysicsTypes.hh:192
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:80
boost::shared_ptr< Road > RoadPtr
Definition: PhysicsTypes.hh:152
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:132
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:136
boost::shared_ptr< JointController > JointControllerPtr
Definition: PhysicsTypes.hh:112
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:88
std::map< std::string, LinkState > LinkState_M
Definition: PhysicsTypes.hh:232
std::vector< ActorPtr > Actor_V
Definition: PhysicsTypes.hh:200
boost::shared_ptr< BoxShape > BoxShapePtr
Definition: PhysicsTypes.hh:164
boost::shared_ptr< Light > LightPtr
Definition: PhysicsTypes.hh:96
std::vector< LinkPtr > Link_V
Definition: PhysicsTypes.hh:216
boost::shared_ptr< MeshShape > MeshShapePtr
Definition: PhysicsTypes.hh:176
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:104
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:72