Klamp't  0.8.1
RigidObject.h
1 #ifndef RIGID_OBJECT_H
2 #define RIGID_OBJECT_H
3 
4 #include <KrisLibrary/geometry/AnyGeometry.h>
5 #include <string>
6 #include "ManagedGeometry.h"
7 using namespace std;
8 using namespace Math3D;
9 
14 {
15 public:
16  RigidObject();
17  bool Load(const char* fn);
18  bool Save(const char* fn);
22  bool LoadGeometry(const char* fn);
23  void SetMassFromGeometry(Real totalMass);
24  void SetMassFromBB(Real totalMass);
25  void InitCollisions();
26  void UpdateGeometry();
27  void DrawGL();
28 
29  string name;
30  string geomFile;
31  ManagedGeometry geometry;
32  RigidTransform T; //current transform
33  Vector3 w,v; //current angular velocity and velocity
34  Real mass; //mass
35  Vector3 com; //center of mass in local frame
36  Matrix3 inertia; //inertia matrix about com
37  Real kFriction;
38  Real kRestitution;
39  Real kStiffness,kDamping;
40 };
41 
42 #endif
A "smart" geometry loading class that caches previous geometries, and does not re-load or re-initiali...
Definition: ManagedGeometry.h:37
A (static) rigid object that may be manipulated.
Definition: RigidObject.h:13