Add a TriMesh to TriMesh collision demo.
[ode.git] / contrib / DotNetManaged / Body.h
blob9347c179ef754904d4ca85739965c0a2c1f602aa
1 #pragma once
3 #include "World.h"
4 #include "CommonMgd.h"
6 namespace ODEManaged
7 {
8 __gc public class Body
10 public:
12 //Constructors and Destructors
14 Body(void);
15 Body(World &world);
17 ~Body(void);
20 //Public Methods
22 dBodyID Id();
23 void SetData (void *data);
24 void *GetData (void);
26 //POSITION
27 void SetPosition(double x, double y, double z);
28 Vector3 GetPosition(void);
29 void GetPosition(double position __gc[]);
31 //ROTATION
32 void SetRotationIdentity(void);
33 void SetRotation(Matrix3 rotation);
34 Matrix3 GetRotation(void);
36 //MASS
37 void SetMass(double mass, Vector3 centerOfGravity, Matrix3 inertia);
38 void SetMassSphere(double density, double radius);
39 void SetMassBox(double density, double sideX, double sideY, double sideZ);
40 void SetMassCappedCylinder(double density, int axis, double cylinderRadius, double cylinderLength);
42 //FORCE AND TORQUE
43 void AddForce(double fX, double fY, double fZ);
44 void AddRelForce(double fX, double fY, double fZ);
45 void AddForceAtPos(double fX, double fY, double fZ,double pX, double pY, double pZ);
46 void AddRelForceAtPos(double fX, double fY, double fZ,double pX, double pY, double pZ);
47 void AddRelForceAtRelPos(double fX, double fY, double fZ,double pX, double pY, double pZ);
48 void ApplyLinearVelocityDrag(double dragCoef);
49 void ApplyAngularVelocityDrag(double dragCoef);
52 void AddTorque(double fX, double fY, double fZ);
53 void AddRelTorque(double fX, double fY, double fZ);
55 //LINEAR VELOCITY
56 void SetLinearVelocity (double x, double y, double z);
57 Vector3 GetLinearVelocity(void);
59 //ANGULAR VELOCITY
60 void SetAngularVelocity (double x, double y, double z);
61 Vector3 GetAngularVelocity(void);
63 //POINT
64 Vector3 GetRelPointPos(double pX, double pY, double pZ);
65 Vector3 GetRelPointVel(double pX, double pY, double pZ);
67 //CONNECTED TO
68 int ConnectedTo (const Body &b);
70 private:
72 dBodyID _id;