aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/contrib/DotNetManaged/JointSlider.h
blob: 7e96e5974b918d0ae48b836e15bde75e20706df7 (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
#pragma once

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

namespace ODEManaged
{
	__gc public class JointSlider : public Joint
	{
	public:
			
		
		//Constructors

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

		//Destructors

			virtual ~JointSlider(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 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 dJointGetSliderParam(this->_id, dParamLoStop);
				}

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


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

			__property void set_HiStop(double value)
			{
				if (value >= 0)
					dJointSetSliderParam(this->_id, dParamHiStop, value);
			}
			

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

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


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

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


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

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


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

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


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

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


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

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


			//GetAngle
			__property double get_Position(void)
			{
				return dJointGetSliderPosition(this->_id);
			}


			//GetAngleRate
			__property double get_PositionRate(void)
			{
				return dJointGetSliderPositionRate(this->_id);
			}

	};
}