Free Electron
Body.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_Body_h__
8 #define __ode_Body_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 
15 class FE_DL_EXPORT Body : public BodyI
16 {
17  public:
18  Body(dWorldID a_world_id);
19 virtual ~Body(void);
20 
21 virtual void setMass(const Mass &a_mass);
22 virtual void getMass(Mass &a_mass);
23 virtual void setPosition(const Vector3 &a_pos);
24 virtual void setRotation(const SpatialTransform &a_rotation);
25 virtual void getPosition(Vector3 &a_pos);
26 virtual void getRotation(SpatialTransform &a_rotation);
27 virtual void applyForce(const SpatialVector &a_force,
28  const SpatialVector &a_pos);
29 virtual void applyTorque(const SpatialVector &a_torque);
30 virtual void getVelocity(SpatialVector &a_velocity,
31  const SpatialVector &a_pos);
32 virtual void getAngularVelocity(SpatialVector &a_velocity);
33 
34 virtual void translate(const SpatialVector &a_displ);
35 
36 virtual hp<MechanicsSimI> &sim(void) { return m_spSim; }
37 
38  dBodyID id(void) { return m_id; }
39 
40 
41  private:
42  dBodyID m_id;
43  SpatialVector m_offset;
44  hp<MechanicsSimI> m_spSim;
45 
46 };
47 
48 } /* namespace ext */
49 } /* namespace fe */
50 
51 #endif /* __ode_Body_h__ */
52 
53 
kernel
Definition: namespace.dox:3