Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
TranslationalLimitMotor.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 using SiliconStudio.Core.Mathematics;
4 
5 namespace SiliconStudio.Paradox.Physics
6 {
8  {
9  BulletSharp.TranslationalLimitMotor mMotor;
10 
11  /// <summary>
12  /// Initializes a new instance of the <see cref="TranslationalLimitMotor"/> class.
13  /// </summary>
14  /// <param name="motor">The motor.</param>
15  public TranslationalLimitMotor(BulletSharp.TranslationalLimitMotor motor)
16  {
17  mMotor = motor;
18  }
19 
20  /// <summary>
21  /// Releases unmanaged and - optionally - managed resources.
22  /// </summary>
23  public void Dispose()
24  {
25  if (mMotor == null) return;
26  mMotor.Dispose();
27  mMotor = null;
28  }
29 
30  /// <summary>
31  /// Gets or sets the accumulated impulse.
32  /// </summary>
33  /// <value>
34  /// The accumulated impulse.
35  /// </value>
36  public Vector3 AccumulatedImpulse
37  {
38  get { return mMotor.AccumulatedImpulse; }
39  set { mMotor.AccumulatedImpulse = value; }
40  }
41 
42  /// <summary>
43  /// Gets or sets the current limit error.
44  /// </summary>
45  /// <value>
46  /// The current limit error.
47  /// </value>
48  public Vector3 CurrentLimitError
49  {
50  get { return mMotor.CurrentLimitError; }
51  set { mMotor.CurrentLimitError = value; }
52  }
53 
54  /// <summary>
55  /// Gets or sets the current linear difference.
56  /// </summary>
57  /// <value>
58  /// The current linear difference.
59  /// </value>
60  public Vector3 CurrentLinearDiff
61  {
62  get { return mMotor.CurrentLinearDiff; }
63  set { mMotor.CurrentLinearDiff = value; }
64  }
65 
66  /// <summary>
67  /// Gets or sets the damping.
68  /// </summary>
69  /// <value>
70  /// The damping.
71  /// </value>
72  public float Damping
73  {
74  get { return mMotor.Damping; }
75  set { mMotor.Damping = value; }
76  }
77 
78  /// <summary>
79  /// Gets or sets the limit softness.
80  /// </summary>
81  /// <value>
82  /// The limit softness.
83  /// </value>
84  public float LimitSoftness
85  {
86  get { return mMotor.LimitSoftness; }
87  set { mMotor.LimitSoftness = value; }
88  }
89 
90  /// <summary>
91  /// Gets or sets the lower limit.
92  /// </summary>
93  /// <value>
94  /// The lower limit.
95  /// </value>
96  public Vector3 LowerLimit
97  {
98  get { return mMotor.LowerLimit; }
99  set { mMotor.LowerLimit = value; }
100  }
101 
102  /// <summary>
103  /// Gets or sets the maximum motor force.
104  /// </summary>
105  /// <value>
106  /// The maximum motor force.
107  /// </value>
108  public Vector3 MaxMotorForce
109  {
110  get { return mMotor.MaxMotorForce; }
111  set { mMotor.MaxMotorForce = value; }
112  }
113 
114  /// <summary>
115  /// Gets or sets the normal CFM.
116  /// </summary>
117  /// <value>
118  /// The normal CFM.
119  /// </value>
120  public Vector3 NormalCFM
121  {
122  get { return mMotor.NormalCFM; }
123  set { mMotor.NormalCFM = value; }
124  }
125 
126  /// <summary>
127  /// Gets or sets the restitution.
128  /// </summary>
129  /// <value>
130  /// The restitution.
131  /// </value>
132  public float Restitution
133  {
134  get { return mMotor.Restitution; }
135  set { mMotor.Restitution = value; }
136  }
137 
138  /// <summary>
139  /// Gets or sets the stop CFM.
140  /// </summary>
141  /// <value>
142  /// The stop CFM.
143  /// </value>
144  public Vector3 StopCFM
145  {
146  get { return mMotor.StopCFM; }
147  set { mMotor.StopCFM = value; }
148  }
149 
150  /// <summary>
151  /// Gets or sets the stop erp.
152  /// </summary>
153  /// <value>
154  /// The stop erp.
155  /// </value>
156  public Vector3 StopERP
157  {
158  get { return mMotor.StopERP; }
159  set { mMotor.StopERP = value; }
160  }
161 
162  /// <summary>
163  /// Gets or sets the target velocity.
164  /// </summary>
165  /// <value>
166  /// The target velocity.
167  /// </value>
168  public Vector3 TargetVelocity
169  {
170  get { return mMotor.TargetVelocity; }
171  set { mMotor.TargetVelocity = value; }
172  }
173 
174  /// <summary>
175  /// Gets or sets the upper limit.
176  /// </summary>
177  /// <value>
178  /// The upper limit.
179  /// </value>
180  public Vector3 UpperLimit
181  {
182  get { return mMotor.UpperLimit; }
183  set { mMotor.UpperLimit = value; }
184  }
185  }
186 }
void Dispose()
Releases unmanaged and - optionally - managed resources.
Represents a three dimensional mathematical vector.
Definition: Vector3.cs:42
using SiliconStudio.Paradox. Physics
TranslationalLimitMotor(BulletSharp.TranslationalLimitMotor motor)
Initializes a new instance of the TranslationalLimitMotor class.