Add a TriMesh to TriMesh collision demo.
[ode.git] / contrib / DotNetManaged / JointHinge.h
blob3115845fb857effed8ccb873e65094564bb58e71
1 #pragma once
3 #include "Joint.h"
4 #include "CommonMgd.h"
6 namespace ODEManaged
8 __gc public class JointHinge : public Joint
10 public:
12 //Constructors
14 JointHinge(void);
15 JointHinge(World &world);
16 JointHinge(World &world, JointGroup &jointGroup);
19 //Destructor
21 virtual~JointHinge(void);
24 //Methods
26 //Overloaded Create
27 void Create(World &world, JointGroup &jointGroup);
28 void Create(World &world);
30 //Overloaded Attach
31 void Attach(Body &body1, Body &body2);
32 void Attach(Body &body1);
34 void SetAnchor(double x, double y, double z);
35 Vector3 GetAnchor(void);
37 void SetAxis(double x, double y, double z);
38 Vector3 GetAxis(void);
40 void SetAllMovParams(double LoStop, double HiStop,
41 double Velocity, double MaxForce,
42 double FudgeFactor, double Bounce,
43 double StopERP, double StopCFM);
46 //Properties
48 //LoStop
49 __property double get_LoStop(void)
51 return dJointGetHingeParam(this->_id, dParamLoStop);
54 __property void set_LoStop(double value)
56 if (value > -3.141592653 && value <= 0)
57 dJointSetHingeParam(this->_id, dParamLoStop, value);
61 //HiStop
62 __property double get_HiStop(void)
64 return dJointGetHingeParam(this->_id, dParamHiStop);
67 __property void set_HiStop(double value)
69 if (value < 3.141592653 && value >= 0)
70 dJointSetHingeParam(this->_id, dParamHiStop, value);
74 //Velocity
75 __property double get_Velocity(void)
77 return dJointGetHingeParam(this->_id, dParamVel);
80 __property void set_Velocity(double value)
82 dJointSetHingeParam(this->_id, dParamVel, value);
86 //MaxForce
87 __property double get_MaxForce(void)
89 return dJointGetHingeParam(this->_id, dParamFMax);
92 __property void set_MaxForce(double value)
94 dJointSetHingeParam(this->_id, dParamFMax, value);
98 //FudgeFactor
99 __property double get_FudgeFactor(void)
101 return dJointGetHingeParam(this->_id, dParamFudgeFactor);
104 __property void set_FudgeFactor(double value)
106 dJointSetHingeParam(this->_id, dParamFudgeFactor, value);
110 //Bounce
111 __property double get_Bounce(void)
113 return dJointGetHingeParam(this->_id, dParamBounce);
116 __property void set_Bounce(double value)
118 dJointSetHingeParam(this->_id, dParamBounce, value);
122 //StopERP
123 __property double get_StopERP(void)
125 return dJointGetHingeParam(this->_id, dParamStopERP);
128 __property void set_StopERP(double value)
130 dJointSetHingeParam(this->_id, dParamStopERP, value);
134 //StopCFM
135 __property double get_StopCFM(void)
137 return dJointGetHingeParam(this->_id, dParamStopCFM);
140 __property void set_StopCFM(double value)
142 dJointSetHingeParam(this->_id, dParamStopCFM, value);
146 //GetAngle
147 __property double get_Angle(void)
149 return dJointGetHingeAngle(this->_id);
153 //GetAngleRate
154 __property double get_AngleRate(void)
156 return dJointGetHingeAngleRate(this->_id);
163 // void SetSuspensionERP(double value);
164 // double GetSuspensionERP(void);
166 // void SetSuspensionCFM(double value);
167 // double GetSuspensionCFM(void);
170 //SetSuspensionERP
171 void JointHinge::SetSuspensionERP(double value)
173 dJointSetHingeParam(this->_id, dParamSuspensionERP, value);
176 //GetSuspensionERP
177 double JointHinge::GetSuspensionERP(void)
179 return dJointGetHingeParam(this->_id, dParamSuspensionERP);
183 //SetSuspensionCFM
184 void JointHinge::SetSuspensionCFM(double value)
186 dJointSetHingeParam(this->_id, dParamSuspensionCFM, value);
189 //GetSuspensionCFM
190 double JointHinge::GetSuspensionCFM(void)
192 return dJointGetHingeParam(this->_id, dParamSuspensionCFM);