Klamp't  0.9.0
ODERigidObject.h
1 #ifndef ODE_RIGID_OBJECT_H
2 #define ODE_RIGID_OBJECT_H
3
4 #include <Klampt/Modeling/RigidObject.h>
5 #include "ODEGeometry.h"
6 #include <KrisLibrary/math/vector.h>
7 #include <ode/common.h>
8 #include <KrisLibrary/File.h>
9
10 namespace Klampt {
11  using namespace Math;
12
20 {
21  public:
23  static ODESurfaceProperties defaultSurface;
24
26  ~ODERigidObject();
27  void Create(dWorldID worldID,dSpaceID space,bool useBoundaryLayer=true);
28  void Clear();
29  void SetTransform(const RigidTransform& T);
30  void GetTransform(RigidTransform& T) const;
31  void SetVelocity(const Vector3& w,const Vector3& v);
32  void GetVelocity(Vector3& w,Vector3& v) const;
33  Real GetKineticEnergy() const;
35  bool WriteState(File& f) const;
36
37  dBodyID body() { return bodyID; }
38  dGeomID geom() { return geometry->geom(); }
39  dSpaceID space() { return spaceID; }
40  ODEGeometry* triMesh() { return geometry; }
41
42  RigidObjectModel& obj;
43
44  private:
45  dBodyID bodyID;
46  ODEGeometry* geometry;
47  dSpaceID spaceID;
48 };
49
50 } //namespace Klampt
51
52 #endif
A (static) rigid object that may be manipulated.
Definition: RigidObject.h:15
An ODE-simulated rigid object.
Definition: ODERigidObject.h:19
surface properties for any ODE rigid object, robot link, or fixed object.
Definition: ODESurface.h:10
Definition: ContactDistance.h:6
An ODE collision geometry.
Definition: ODEGeometry.h:19