Free Electron
World.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __ode_World_h__
8 #define __ode_World_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 class FE_DL_EXPORT World :
15  virtual public MechanicsSimI,
16  public Initialize<World>
17 {
18  public:
19  World(void);
20 virtual ~World(void);
21 
22  void initialize(void);
23 virtual void step(Real a_dt);
24 
25 virtual sp<BodyI> createBody(void);
26 virtual sp<JointI> createJoint(JointType a_type,
27  sp<BodyI> a_A, sp<BodyI> a_B);
28 virtual sp<JointI> createContact(sp<BodyI> a_A,
29  const SpatialVector &a_location,
30  const SpatialVector &a_normal,
31  Real a_depth, Real a_stiffness,
32  Real a_damping, Real a_timestep);
33 
34 virtual void setGravity(const Vector3 &a_gravity);
35 
36  dWorldID id(void) { return m_world; }
37 
38  private:
39  dWorldID m_world;
40  sp<Component> m_ode;
41 };
42 
43 } /* namespace ext */
44 } /* namespace fe */
45 
46 #endif /* __ode_World_h__ */
47 
48 
kernel
Definition: namespace.dox:3