Klamp't  0.8.1
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 using namespace Math;
10 
18 {
19  public:
20  static double defaultPadding;
21  static ODESurfaceProperties defaultSurface;
22 
24  ~ODERigidObject();
25  void Create(dWorldID worldID,dSpaceID space,bool useBoundaryLayer=true);
26  void Clear();
27  void SetTransform(const RigidTransform& T);
28  void GetTransform(RigidTransform& T) const;
29  void SetVelocity(const Vector3& w,const Vector3& v);
30  void GetVelocity(Vector3& w,Vector3& v) const;
31  Real GetKineticEnergy() const;
32  bool ReadState(File& f);
33  bool WriteState(File& f) const;
34 
35  dBodyID body() { return bodyID; }
36  dGeomID geom() { return geometry->geom(); }
37  dSpaceID space() { return spaceID; }
38  ODEGeometry* triMesh() { return geometry; }
39 
40  RigidObject& obj;
41 
42  private:
43  dBodyID bodyID;
44  ODEGeometry* geometry;
45  dSpaceID spaceID;
46 };
47 
48 #endif
An ODE collision geometry.
Definition: ODEGeometry.h:17
An ODE-simulated rigid object.
Definition: ODERigidObject.h:17
A (static) rigid object that may be manipulated.
Definition: RigidObject.h:13
surface properties for any ODE rigid object, robot link, or fixed object.
Definition: ODESurface.h:8