aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h
blob: 3115845fb857effed8ccb873e65094564bb58e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#pragma once

#include "Joint.h"
#include "CommonMgd.h"

namespace ODEManaged
{
	__gc public class JointHinge : public Joint
	{
	public:

		//Constructors

			JointHinge(void);
			JointHinge(World &world);
			JointHinge(World &world, JointGroup &jointGroup);
			

		//Destructor

			virtual~JointHinge(void);

		
		//Methods	
			
			//Overloaded Create
			void Create(World &world, JointGroup &jointGroup);
			void Create(World &world);

			//Overloaded Attach
			void Attach(Body &body1, Body &body2);	
			void Attach(Body &body1);

			void SetAnchor(double x, double y, double z);
			Vector3 GetAnchor(void);

			void SetAxis(double x, double y, double z);
			Vector3 GetAxis(void);

			void SetAllMovParams(double LoStop, double HiStop,
								 double Velocity, double MaxForce,
								 double FudgeFactor, double Bounce,
								 double StopERP, double StopCFM);


		//Properties

			//LoStop
			__property double get_LoStop(void)
				{
					return dJointGetHingeParam(this->_id, dParamLoStop);
				}

			__property void	set_LoStop(double value)
			{
				if (value > -3.141592653 && value <= 0)
					dJointSetHingeParam(this->_id, dParamLoStop, value);
			}


			//HiStop
			__property double get_HiStop(void)
			{
				return dJointGetHingeParam(this->_id, dParamHiStop);
			}

			__property void set_HiStop(double value)
			{
				if (value < 3.141592653 && value >= 0)
					dJointSetHingeParam(this->_id, dParamHiStop, value);
			}
			

			//Velocity
			__property double get_Velocity(void)
			{
				return dJointGetHingeParam(this->_id, dParamVel);
			}

			__property void set_Velocity(double value)
			{
				dJointSetHingeParam(this->_id, dParamVel, value);
			}


			//MaxForce
			__property double get_MaxForce(void)
			{
				return dJointGetHingeParam(this->_id, dParamFMax);
			}

			__property void set_MaxForce(double value)
			{
				dJointSetHingeParam(this->_id, dParamFMax, value);
			}


			//FudgeFactor
			__property double get_FudgeFactor(void)
			{
				return dJointGetHingeParam(this->_id, dParamFudgeFactor);
			}

			__property void set_FudgeFactor(double value)
			{
				dJointSetHingeParam(this->_id, dParamFudgeFactor, value);
			}


			//Bounce
			__property double get_Bounce(void)
			{
				return dJointGetHingeParam(this->_id, dParamBounce);
			}

			__property void set_Bounce(double value)
			{
				dJointSetHingeParam(this->_id, dParamBounce, value);
			}


			//StopERP
			__property double get_StopERP(void)
			{
				return dJointGetHingeParam(this->_id, dParamStopERP);
			}

			__property void set_StopERP(double value)
			{
				dJointSetHingeParam(this->_id, dParamStopERP, value);
			}


			//StopCFM
			__property double get_StopCFM(void)
			{
				return dJointGetHingeParam(this->_id, dParamStopCFM);
			}

			__property void set_StopCFM(double value)
			{
				dJointSetHingeParam(this->_id, dParamStopCFM, value);
			}


			//GetAngle
			__property double get_Angle(void)
			{
				return dJointGetHingeAngle(this->_id);
			}


			//GetAngleRate
			__property double get_AngleRate(void)
			{
				return dJointGetHingeAngleRate(this->_id);
			}

	};

}

//				void	SetSuspensionERP(double value);
//				double	GetSuspensionERP(void);

//				void	SetSuspensionCFM(double value);
//				double	GetSuspensionCFM(void);

/*				
			//SetSuspensionERP
			void JointHinge::SetSuspensionERP(double value)
			{
				dJointSetHingeParam(this->_id, dParamSuspensionERP, value);
			}

			//GetSuspensionERP
			double JointHinge::GetSuspensionERP(void)
			{
				return dJointGetHingeParam(this->_id, dParamSuspensionERP);
			}
							
				
			//SetSuspensionCFM
			void JointHinge::SetSuspensionCFM(double value)
			{
				dJointSetHingeParam(this->_id, dParamSuspensionCFM, value);
			}

			//GetSuspensionCFM
			double JointHinge::GetSuspensionCFM(void)
			{
				return dJointGetHingeParam(this->_id, dParamSuspensionCFM);
			}

*/