Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ConeTwistConstraint.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 
4 using SiliconStudio.Core.Mathematics;
5 
6 namespace SiliconStudio.Paradox.Physics
7 {
9  {
10  internal BulletSharp.ConeTwistConstraint InternalConeTwistConstraint;
11 
12  /// <summary>
13  /// Gets or sets the fix thresh.
14  /// </summary>
15  /// <value>
16  /// The fix thresh.
17  /// </value>
18  public float FixThresh
19  {
20  get { return InternalConeTwistConstraint.FixThresh; }
21  set { InternalConeTwistConstraint.FixThresh = value; }
22  }
23 
24  /// <summary>
25  /// Gets the swing span1.
26  /// </summary>
27  /// <value>
28  /// The swing span1.
29  /// </value>
30  public float SwingSpan1
31  {
32  get { return InternalConeTwistConstraint.SwingSpan1; }
33  }
34 
35  /// <summary>
36  /// Gets the swing span2.
37  /// </summary>
38  /// <value>
39  /// The swing span2.
40  /// </value>
41  public float SwingSpan2
42  {
43  get { return InternalConeTwistConstraint.SwingSpan2; }
44  }
45 
46  /// <summary>
47  /// Gets the twist angle.
48  /// </summary>
49  /// <value>
50  /// The twist angle.
51  /// </value>
52  public float TwistAngle
53  {
54  get { return InternalConeTwistConstraint.TwistAngle; }
55  }
56 
57  /// <summary>
58  /// Gets the twist limit sign.
59  /// </summary>
60  /// <value>
61  /// The twist limit sign.
62  /// </value>
63  public float TwistLimitSign
64  {
65  get { return InternalConeTwistConstraint.TwistLimitSign; }
66  }
67 
68  /// <summary>
69  /// Gets the twist span.
70  /// </summary>
71  /// <value>
72  /// The twist span.
73  /// </value>
74  public float TwistSpan
75  {
76  get { return InternalConeTwistConstraint.TwistSpan; }
77  }
78 
79  /// <summary>
80  /// Gets a value indicating whether this instance is past swing limit.
81  /// </summary>
82  /// <value>
83  /// <c>true</c> if this instance is past swing limit; otherwise, <c>false</c>.
84  /// </value>
85  public bool IsPastSwingLimit
86  {
87  get { return InternalConeTwistConstraint.IsPastSwingLimit; }
88  }
89 
90  /// <summary>
91  /// Gets the solve swing limit.
92  /// </summary>
93  /// <value>
94  /// The solve swing limit.
95  /// </value>
96  public int SolveSwingLimit
97  {
98  get { return InternalConeTwistConstraint.SolveSwingLimit; }
99  }
100 
101  /// <summary>
102  /// Gets the solve twist limit.
103  /// </summary>
104  /// <value>
105  /// The solve twist limit.
106  /// </value>
107  public int SolveTwistLimit
108  {
109  get { return InternalConeTwistConstraint.SolveTwistLimit; }
110  }
111 
112  /// <summary>
113  /// Sets the frames.
114  /// </summary>
115  /// <param name="frameA">The frame a.</param>
116  /// <param name="frameB">The frame b.</param>
117  public void SetFrames(Matrix frameA, Matrix frameB)
118  {
119  InternalConeTwistConstraint.SetFrames(frameA, frameB);
120  }
121 
122  /// <summary>
123  /// Sets the limit.
124  /// </summary>
125  /// <param name="swingSpan1">The swing span1.</param>
126  /// <param name="swingSpan2">The swing span2.</param>
127  /// <param name="twistSpan">The twist span.</param>
128  public void SetLimit(float swingSpan1, float swingSpan2, float twistSpan)
129  {
130  InternalConeTwistConstraint.SetLimit(swingSpan1, swingSpan2, twistSpan);
131  }
132 
133  /// <summary>
134  /// Sets the limit.
135  /// </summary>
136  /// <param name="swingSpan1">The swing span1.</param>
137  /// <param name="swingSpan2">The swing span2.</param>
138  /// <param name="twistSpan">The twist span.</param>
139  /// <param name="softness">The softness.</param>
140  /// <param name="biasFactor">The bias factor.</param>
141  public void SetLimit(float swingSpan1, float swingSpan2, float twistSpan, float softness, float biasFactor)
142  {
143  InternalConeTwistConstraint.SetLimit(swingSpan1, swingSpan2, twistSpan, softness);
144  }
145 
146  /// <summary>
147  /// Sets the limit.
148  /// </summary>
149  /// <param name="swingSpan1">The swing span1.</param>
150  /// <param name="swingSpan2">The swing span2.</param>
151  /// <param name="twistSpan">The twist span.</param>
152  /// <param name="softness">The softness.</param>
153  /// <param name="biasFactor">The bias factor.</param>
154  /// <param name="relaxationFactor">The relaxation factor.</param>
155  public void SetLimit(float swingSpan1, float swingSpan2, float twistSpan, float softness, float biasFactor, float relaxationFactor)
156  {
157  InternalConeTwistConstraint.SetLimit(swingSpan1, swingSpan2, twistSpan, softness, biasFactor);
158  }
159 
160  /// <summary>
161  /// Sets the angular only.
162  /// </summary>
163  /// <param name="angularOnly">if set to <c>true</c> [angular only].</param>
164  public void SetAngularOnly(bool angularOnly)
165  {
166  InternalConeTwistConstraint.SetAngularOnly(angularOnly);
167  }
168 
169  /// <summary>
170  /// Sets the damping.
171  /// </summary>
172  /// <param name="damping">The damping.</param>
173  public void SetDamping(float damping)
174  {
175  InternalConeTwistConstraint.SetDamping(damping);
176  }
177 
178  /// <summary>
179  /// Enables the motor.
180  /// </summary>
181  /// <param name="b">if set to <c>true</c> [b].</param>
182  public void EnableMotor(bool b)
183  {
184  InternalConeTwistConstraint.EnableMotor(b);
185  }
186 
187  /// <summary>
188  /// Sets the maximum motor impulse.
189  /// </summary>
190  /// <param name="maxMotorImpulse">The maximum motor impulse.</param>
191  public void SetMaxMotorImpulse(float maxMotorImpulse)
192  {
193  InternalConeTwistConstraint.SetMaxMotorImpulse(maxMotorImpulse);
194  }
195 
196  /// <summary>
197  /// Sets the maximum motor impulse normalized.
198  /// </summary>
199  /// <param name="maxMotorImpulse">The maximum motor impulse.</param>
200  public void SetMaxMotorImpulseNormalized(float maxMotorImpulse)
201  {
202  InternalConeTwistConstraint.SetMaxMotorImpulseNormalized(maxMotorImpulse);
203  }
204 
205  /// <summary>
206  /// Sets the motor target.
207  /// </summary>
208  /// <param name="q">The q.</param>
209  public void SetMotorTarget(Quaternion q)
210  {
211  InternalConeTwistConstraint.SetMotorTarget(q);
212  }
213 
214  /// <summary>
215  /// Sets the motor target in constraint space.
216  /// </summary>
217  /// <param name="q">The q.</param>
219  {
220  InternalConeTwistConstraint.SetMotorTargetInConstraintSpace(q);
221  }
222  }
223 }
void SetMaxMotorImpulse(float maxMotorImpulse)
Sets the maximum motor impulse.
function b
void SetFrames(Matrix frameA, Matrix frameB)
Sets the frames.
void SetDamping(float damping)
Sets the damping.
void SetMotorTargetInConstraintSpace(Quaternion q)
Sets the motor target in constraint space.
Represents a four dimensional mathematical quaternion.
Definition: Quaternion.cs:45
void SetLimit(float swingSpan1, float swingSpan2, float twistSpan, float softness, float biasFactor, float relaxationFactor)
Sets the limit.
using SiliconStudio.Paradox. Physics
void SetMotorTarget(Quaternion q)
Sets the motor target.
void SetLimit(float swingSpan1, float swingSpan2, float twistSpan)
Sets the limit.
void SetAngularOnly(bool angularOnly)
Sets the angular only.
void SetMaxMotorImpulseNormalized(float maxMotorImpulse)
Sets the maximum motor impulse normalized.
void SetLimit(float swingSpan1, float swingSpan2, float twistSpan, float softness, float biasFactor)
Sets the limit.
Represents a 4x4 mathematical matrix.
Definition: Matrix.cs:47