Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RotationalLimitMotor.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 namespace SiliconStudio.Paradox.Physics
4 {
5  public class RotationalLimitMotor
6  {
7  BulletSharp.RotationalLimitMotor mMotor;
8 
9  /// <summary>
10  /// Initializes a new instance of the <see cref="RotationalLimitMotor"/> class.
11  /// </summary>
12  /// <param name="motor">The motor.</param>
13  public RotationalLimitMotor(BulletSharp.RotationalLimitMotor motor)
14  {
15  mMotor = motor;
16  }
17 
18  /// <summary>
19  /// Releases unmanaged and - optionally - managed resources.
20  /// </summary>
21  public void Dispose()
22  {
23  if (mMotor == null) return;
24  mMotor.Dispose();
25  mMotor = null;
26  }
27 
28  /// <summary>
29  /// Gets or sets the accumulated impulse.
30  /// </summary>
31  /// <value>
32  /// The accumulated impulse.
33  /// </value>
34  public float AccumulatedImpulse
35  {
36  get { return mMotor.AccumulatedImpulse; }
37  set { mMotor.AccumulatedImpulse = value; }
38  }
39 
40  /// <summary>
41  /// Gets or sets the bounce.
42  /// </summary>
43  /// <value>
44  /// The bounce.
45  /// </value>
46  public float Bounce
47  {
48  get { return mMotor.Bounce; }
49  set { mMotor.Bounce = value; }
50  }
51 
52  /// <summary>
53  /// Gets or sets the current limit.
54  /// </summary>
55  /// <value>
56  /// The current limit.
57  /// </value>
58  public int CurrentLimit
59  {
60  get { return mMotor.CurrentLimit; }
61  set { mMotor.CurrentLimit = value; }
62  }
63 
64  /// <summary>
65  /// Gets or sets the current limit error.
66  /// </summary>
67  /// <value>
68  /// The current limit error.
69  /// </value>
70  public float CurrentLimitError
71  {
72  get { return mMotor.CurrentLimitError; }
73  set { mMotor.CurrentLimitError = value; }
74  }
75 
76  /// <summary>
77  /// Gets or sets the current position.
78  /// </summary>
79  /// <value>
80  /// The current position.
81  /// </value>
82  public float CurrentPosition
83  {
84  get { return mMotor.CurrentPosition; }
85  set { mMotor.CurrentPosition = value; }
86  }
87 
88  /// <summary>
89  /// Gets or sets the damping.
90  /// </summary>
91  /// <value>
92  /// The damping.
93  /// </value>
94  public float Damping
95  {
96  get { return mMotor.Damping; }
97  set { mMotor.Damping = value; }
98  }
99 
100  /// <summary>
101  /// Gets or sets a value indicating whether to enable the motor.
102  /// </summary>
103  /// <value>
104  /// <c>true</c> if the motor is enabled; otherwise, <c>false</c>.
105  /// </value>
106  public bool EnableMotor
107  {
108  get { return mMotor.EnableMotor; }
109  set { mMotor.EnableMotor = value; }
110  }
111 
112  /// <summary>
113  /// Gets or sets the hi limit.
114  /// </summary>
115  /// <value>
116  /// The hi limit.
117  /// </value>
118  public float HiLimit
119  {
120  get { return mMotor.HiLimit; }
121  set { mMotor.HiLimit = value; }
122  }
123 
124  /// <summary>
125  /// Gets a value indicating whether this instance is limited.
126  /// </summary>
127  /// <value>
128  /// <c>true</c> if this instance is limited; otherwise, <c>false</c>.
129  /// </value>
130  public bool IsLimited
131  {
132  get { return mMotor.IsLimited; }
133  }
134 
135  /// <summary>
136  /// Gets or sets the limit softness.
137  /// </summary>
138  /// <value>
139  /// The limit softness.
140  /// </value>
141  public float LimitSoftness
142  {
143  get { return mMotor.LimitSoftness; }
144  set { mMotor.LimitSoftness = value; }
145  }
146 
147  /// <summary>
148  /// Gets or sets the lo limit.
149  /// </summary>
150  /// <value>
151  /// The lo limit.
152  /// </value>
153  public float LoLimit
154  {
155  get { return mMotor.LoLimit; }
156  set { mMotor.LoLimit = value; }
157  }
158 
159  /// <summary>
160  /// Gets or sets the maximum limit force.
161  /// </summary>
162  /// <value>
163  /// The maximum limit force.
164  /// </value>
165  public float MaxLimitForce
166  {
167  get { return mMotor.MaxLimitForce; }
168  set { mMotor.MaxLimitForce = value; }
169  }
170 
171  /// <summary>
172  /// Gets or sets the maximum motor force.
173  /// </summary>
174  /// <value>
175  /// The maximum motor force.
176  /// </value>
177  public float MaxMotorForce
178  {
179  get { return mMotor.MaxMotorForce; }
180  set { mMotor.MaxMotorForce = value; }
181  }
182 
183  /// <summary>
184  /// Gets or sets the normal CFM.
185  /// </summary>
186  /// <value>
187  /// The normal CFM.
188  /// </value>
189  public float NormalCfm
190  {
191  get { return mMotor.NormalCFM; }
192  set { mMotor.NormalCFM = value; }
193  }
194 
195  /// <summary>
196  /// Gets or sets the stop CFM.
197  /// </summary>
198  /// <value>
199  /// The stop CFM.
200  /// </value>
201  public float StopCfm
202  {
203  get { return mMotor.StopCFM; }
204  set { mMotor.StopCFM = value; }
205  }
206 
207  /// <summary>
208  /// Gets or sets the stop erp.
209  /// </summary>
210  /// <value>
211  /// The stop erp.
212  /// </value>
213  public float StopErp
214  {
215  get { return mMotor.StopERP; }
216  set { mMotor.StopERP = value; }
217  }
218 
219  /// <summary>
220  /// Gets or sets the target velocity.
221  /// </summary>
222  /// <value>
223  /// The target velocity.
224  /// </value>
225  public float TargetVelocity
226  {
227  get { return mMotor.TargetVelocity; }
228  set { mMotor.TargetVelocity = value; }
229  }
230  }
231 }
using SiliconStudio.Paradox. Physics
void Dispose()
Releases unmanaged and - optionally - managed resources.
RotationalLimitMotor(BulletSharp.RotationalLimitMotor motor)
Initializes a new instance of the RotationalLimitMotor class.