Bullet Collision Detection & Physics Library: btSliderConstraint.h Source File

Bullet Collision Detection & Physics Library

btSliderConstraint.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16 /*
17 Added by Roman Ponomarev (rponom@gmail.com)
18 April 04, 2008
19
20 TODO:
21 - add clamping od accumulated impulse to improve stability
22 - add conversion for ODE constraint solver
23 */
24
25 #ifndef BT_SLIDER_CONSTRAINT_H
26 #define BT_SLIDER_CONSTRAINT_H
27
28 #include "LinearMath/btScalar.h"//for BT_USE_DOUBLE_PRECISION
29
30 #ifdef BT_USE_DOUBLE_PRECISION
31 #define btSliderConstraintData2 btSliderConstraintDoubleData
32 #define btSliderConstraintDataName "btSliderConstraintDoubleData"
33 #else
34 #define btSliderConstraintData2 btSliderConstraintData
35 #define btSliderConstraintDataName "btSliderConstraintData"
36 #endif //BT_USE_DOUBLE_PRECISION
37
38 #include "LinearMath/btVector3.h"
39 #include "btJacobianEntry.h"
40 #include "btTypedConstraint.h"
41
42
43
44 class btRigidBody;
45
46
47
48 #define SLIDER_CONSTRAINT_DEF_SOFTNESS (btScalar(1.0))
49 #define SLIDER_CONSTRAINT_DEF_DAMPING (btScalar(1.0))
50 #define SLIDER_CONSTRAINT_DEF_RESTITUTION (btScalar(0.7))
51 #define SLIDER_CONSTRAINT_DEF_CFM (btScalar(0.f))
52
53
54 enum btSliderFlags
55 {
56 BT_SLIDER_FLAGS_CFM_DIRLIN = (1 << 0),
57 BT_SLIDER_FLAGS_ERP_DIRLIN = (1 << 1),
58 BT_SLIDER_FLAGS_CFM_DIRANG = (1 << 2),
59 BT_SLIDER_FLAGS_ERP_DIRANG = (1 << 3),
60 BT_SLIDER_FLAGS_CFM_ORTLIN = (1 << 4),
61 BT_SLIDER_FLAGS_ERP_ORTLIN = (1 << 5),
62 BT_SLIDER_FLAGS_CFM_ORTANG = (1 << 6),
63 BT_SLIDER_FLAGS_ERP_ORTANG = (1 << 7),
64 BT_SLIDER_FLAGS_CFM_LIMLIN = (1 << 8),
65 BT_SLIDER_FLAGS_ERP_LIMLIN = (1 << 9),
66 BT_SLIDER_FLAGS_CFM_LIMANG = (1 << 10),
67 BT_SLIDER_FLAGS_ERP_LIMANG = (1 << 11)
68 };
69
70
71 ATTRIBUTE_ALIGNED16(class) btSliderConstraint : public btTypedConstraint
72 {
73 protected:
75 bool m_useSolveConstraintObsolete;
76 bool m_useOffsetForConstraintFrame;
77 btTransform m_frameInA;
78 btTransform m_frameInB;
79 // use frameA fo define limits, if true
80 bool m_useLinearReferenceFrameA;
81 // linear limits
82 btScalar m_lowerLinLimit;
83 btScalar m_upperLinLimit;
84 // angular limits
85 btScalar m_lowerAngLimit;
86 btScalar m_upperAngLimit;
87 // softness, restitution and damping for different cases
88 // DirLin - moving inside linear limits
89 // LimLin - hitting linear limit
90 // DirAng - moving inside angular limits
91 // LimAng - hitting angular limit
92 // OrthoLin, OrthoAng - against constraint axis
93 btScalar m_softnessDirLin;
94 btScalar m_restitutionDirLin;
95 btScalar m_dampingDirLin;
96 btScalar m_cfmDirLin;
97
98 btScalar m_softnessDirAng;
99 btScalar m_restitutionDirAng;
100 btScalar m_dampingDirAng;
101 btScalar m_cfmDirAng;
102
103 btScalar m_softnessLimLin;
104 btScalar m_restitutionLimLin;
105 btScalar m_dampingLimLin;
106 btScalar m_cfmLimLin;
107
108 btScalar m_softnessLimAng;
109 btScalar m_restitutionLimAng;
110 btScalar m_dampingLimAng;
111 btScalar m_cfmLimAng;
112
113 btScalar m_softnessOrthoLin;
114 btScalar m_restitutionOrthoLin;
115 btScalar m_dampingOrthoLin;
116 btScalar m_cfmOrthoLin;
117
118 btScalar m_softnessOrthoAng;
119 btScalar m_restitutionOrthoAng;
120 btScalar m_dampingOrthoAng;
121 btScalar m_cfmOrthoAng;
122
123 // for interlal use
124 bool m_solveLinLim;
125 bool m_solveAngLim;
126
127 int m_flags;
128
129 btJacobianEntry m_jacLin[3];
130 btScalar m_jacLinDiagABInv[3];
131
132 btJacobianEntry m_jacAng[3];
133
134 btScalar m_timeStep;
135 btTransform m_calculatedTransformA;
136 btTransform m_calculatedTransformB;
137
138 btVector3 m_sliderAxis;
139 btVector3 m_realPivotAInW;
140 btVector3 m_realPivotBInW;
141 btVector3 m_projPivotInW;
142 btVector3 m_delta;
143 btVector3 m_depth;
144 btVector3 m_relPosA;
145 btVector3 m_relPosB;
146
147 btScalar m_linPos;
148 btScalar m_angPos;
149
150 btScalar m_angDepth;
151 btScalar m_kAngle;
152
153 bool m_poweredLinMotor;
154 btScalar m_targetLinMotorVelocity;
155 btScalar m_maxLinMotorForce;
156 btScalar m_accumulatedLinMotorImpulse;
157
158 bool m_poweredAngMotor;
159 btScalar m_targetAngMotorVelocity;
160 btScalar m_maxAngMotorForce;
161 btScalar m_accumulatedAngMotorImpulse;
162
163 //------------------------
164 void initParams();
165 public:
166 BT_DECLARE_ALIGNED_ALLOCATOR();
167
168 // constructors
169 btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
170 btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA);
171
172 // overrides
173
174 virtual void getInfo1 (btConstraintInfo1* info);
175
176 void getInfo1NonVirtual(btConstraintInfo1* info);
177
178 virtual void getInfo2 (btConstraintInfo2* info);
179
180 void getInfo2NonVirtual(btConstraintInfo2* info, const btTransform& transA, const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB, btScalar rbAinvMass,btScalar rbBinvMass);
181
182
183 // access
184 const btRigidBody& getRigidBodyA() const { return m_rbA; }
185 const btRigidBody& getRigidBodyB() const { return m_rbB; }
186 const btTransform & getCalculatedTransformA() const { return m_calculatedTransformA; }
187 const btTransform & getCalculatedTransformB() const { return m_calculatedTransformB; }
188 const btTransform & getFrameOffsetA() const { return m_frameInA; }
189 const btTransform & getFrameOffsetB() const { return m_frameInB; }
190 btTransform & getFrameOffsetA() { return m_frameInA; }
191 btTransform & getFrameOffsetB() { return m_frameInB; }
192 btScalar getLowerLinLimit() { return m_lowerLinLimit; }
193 void setLowerLinLimit(btScalar lowerLimit) { m_lowerLinLimit = lowerLimit; }
194 btScalar getUpperLinLimit() { return m_upperLinLimit; }
195 void setUpperLinLimit(btScalar upperLimit) { m_upperLinLimit = upperLimit; }
196 btScalar getLowerAngLimit() { return m_lowerAngLimit; }
197 void setLowerAngLimit(btScalar lowerLimit) { m_lowerAngLimit = btNormalizeAngle(lowerLimit); }
198 btScalar getUpperAngLimit() { return m_upperAngLimit; }
199 void setUpperAngLimit(btScalar upperLimit) { m_upperAngLimit = btNormalizeAngle(upperLimit); }
200 bool getUseLinearReferenceFrameA() { return m_useLinearReferenceFrameA; }
201 btScalar getSoftnessDirLin() { return m_softnessDirLin; }
202 btScalar getRestitutionDirLin() { return m_restitutionDirLin; }
203 btScalar getDampingDirLin() { return m_dampingDirLin ; }
204 btScalar getSoftnessDirAng() { return m_softnessDirAng; }
205 btScalar getRestitutionDirAng() { return m_restitutionDirAng; }
206 btScalar getDampingDirAng() { return m_dampingDirAng; }
207 btScalar getSoftnessLimLin() { return m_softnessLimLin; }
208 btScalar getRestitutionLimLin() { return m_restitutionLimLin; }
209 btScalar getDampingLimLin() { return m_dampingLimLin; }
210 btScalar getSoftnessLimAng() { return m_softnessLimAng; }
211 btScalar getRestitutionLimAng() { return m_restitutionLimAng; }
212 btScalar getDampingLimAng() { return m_dampingLimAng; }
213 btScalar getSoftnessOrthoLin() { return m_softnessOrthoLin; }
214 btScalar getRestitutionOrthoLin() { return m_restitutionOrthoLin; }
215 btScalar getDampingOrthoLin() { return m_dampingOrthoLin; }
216 btScalar getSoftnessOrthoAng() { return m_softnessOrthoAng; }
217 btScalar getRestitutionOrthoAng() { return m_restitutionOrthoAng; }
218 btScalar getDampingOrthoAng() { return m_dampingOrthoAng; }
219 void setSoftnessDirLin(btScalar softnessDirLin) { m_softnessDirLin = softnessDirLin; }
220 void setRestitutionDirLin(btScalar restitutionDirLin) { m_restitutionDirLin = restitutionDirLin; }
221 void setDampingDirLin(btScalar dampingDirLin) { m_dampingDirLin = dampingDirLin; }
222 void setSoftnessDirAng(btScalar softnessDirAng) { m_softnessDirAng = softnessDirAng; }
223 void setRestitutionDirAng(btScalar restitutionDirAng) { m_restitutionDirAng = restitutionDirAng; }
224 void setDampingDirAng(btScalar dampingDirAng) { m_dampingDirAng = dampingDirAng; }
225 void setSoftnessLimLin(btScalar softnessLimLin) { m_softnessLimLin = softnessLimLin; }
226 void setRestitutionLimLin(btScalar restitutionLimLin) { m_restitutionLimLin = restitutionLimLin; }
227 void setDampingLimLin(btScalar dampingLimLin) { m_dampingLimLin = dampingLimLin; }
228 void setSoftnessLimAng(btScalar softnessLimAng) { m_softnessLimAng = softnessLimAng; }
229 void setRestitutionLimAng(btScalar restitutionLimAng) { m_restitutionLimAng = restitutionLimAng; }
230 void setDampingLimAng(btScalar dampingLimAng) { m_dampingLimAng = dampingLimAng; }
231 void setSoftnessOrthoLin(btScalar softnessOrthoLin) { m_softnessOrthoLin = softnessOrthoLin; }
232 void setRestitutionOrthoLin(btScalar restitutionOrthoLin) { m_restitutionOrthoLin = restitutionOrthoLin; }
233 void setDampingOrthoLin(btScalar dampingOrthoLin) { m_dampingOrthoLin = dampingOrthoLin; }
234 void setSoftnessOrthoAng(btScalar softnessOrthoAng) { m_softnessOrthoAng = softnessOrthoAng; }
235 void setRestitutionOrthoAng(btScalar restitutionOrthoAng) { m_restitutionOrthoAng = restitutionOrthoAng; }
236 void setDampingOrthoAng(btScalar dampingOrthoAng) { m_dampingOrthoAng = dampingOrthoAng; }
237 void setPoweredLinMotor(bool onOff) { m_poweredLinMotor = onOff; }
238 bool getPoweredLinMotor() { return m_poweredLinMotor; }
239 void setTargetLinMotorVelocity(btScalar targetLinMotorVelocity) { m_targetLinMotorVelocity = targetLinMotorVelocity; }
240 btScalar getTargetLinMotorVelocity() { return m_targetLinMotorVelocity; }
241 void setMaxLinMotorForce(btScalar maxLinMotorForce) { m_maxLinMotorForce = maxLinMotorForce; }
242 btScalar getMaxLinMotorForce() { return m_maxLinMotorForce; }
243 void setPoweredAngMotor(bool onOff) { m_poweredAngMotor = onOff; }
244 bool getPoweredAngMotor() { return m_poweredAngMotor; }
245 void setTargetAngMotorVelocity(btScalar targetAngMotorVelocity) { m_targetAngMotorVelocity = targetAngMotorVelocity; }
246 btScalar getTargetAngMotorVelocity() { return m_targetAngMotorVelocity; }
247 void setMaxAngMotorForce(btScalar maxAngMotorForce) { m_maxAngMotorForce = maxAngMotorForce; }
248 btScalar getMaxAngMotorForce() { return m_maxAngMotorForce; }
249
250 btScalar getLinearPos() const { return m_linPos; }
251 btScalar getAngularPos() const { return m_angPos; }
252
253
254
255 // access for ODE solver
256 bool getSolveLinLimit() { return m_solveLinLim; }
257 btScalar getLinDepth() { return m_depth[0]; }
258 bool getSolveAngLimit() { return m_solveAngLim; }
259 btScalar getAngDepth() { return m_angDepth; }
260 // shared code used by ODE solver
261 void calculateTransforms(const btTransform& transA,const btTransform& transB);
262 void testLinLimits();
263 void testAngLimits();
264 // access for PE Solver
265 btVector3 getAncorInA();
266 btVector3 getAncorInB();
267 // access for UseFrameOffset
268 bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
269 void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
270
271 void setFrames(const btTransform& frameA, const btTransform& frameB)
272 {
273 m_frameInA=frameA;
274 m_frameInB=frameB;
275 calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
276 buildJacobian();
277 }
278
279
282 virtual void setParam(int num, btScalar value, int axis = -1);
284 virtual btScalar getParam(int num, int axis = -1) const;
285
286 virtual int getFlags() const
287 {
288 return m_flags;
289 }
290
291 virtual int calculateSerializeBufferSize() const;
292
294 virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
295
296
297 };
298
299
301
302
303 struct btSliderConstraintData
304 {
305 btTypedConstraintData m_typeConstraintData;
306 btTransformFloatData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
307 btTransformFloatData m_rbBFrame;
308
309 float m_linearUpperLimit;
310 float m_linearLowerLimit;
311
312 float m_angularUpperLimit;
313 float m_angularLowerLimit;
314
315 int m_useLinearReferenceFrameA;
316 int m_useOffsetForConstraintFrame;
317
318 };
319
320
321 struct btSliderConstraintDoubleData
322 {
323 btTypedConstraintDoubleData m_typeConstraintData;
324 btTransformDoubleData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
325 btTransformDoubleData m_rbBFrame;
326
327 double m_linearUpperLimit;
328 double m_linearLowerLimit;
329
330 double m_angularUpperLimit;
331 double m_angularLowerLimit;
332
333 int m_useLinearReferenceFrameA;
334 int m_useOffsetForConstraintFrame;
335
336 };
337
338 SIMD_FORCE_INLINE int btSliderConstraint::calculateSerializeBufferSize() const
339 {
340 return sizeof(btSliderConstraintData2);
341 }
342
344 SIMD_FORCE_INLINE const char* btSliderConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
345 {
346
347 btSliderConstraintData2* sliderData = (btSliderConstraintData2*) dataBuffer;
348 btTypedConstraint::serialize(&sliderData->m_typeConstraintData,serializer);
349
350 m_frameInA.serialize(sliderData->m_rbAFrame);
351 m_frameInB.serialize(sliderData->m_rbBFrame);
352
353 sliderData->m_linearUpperLimit = m_upperLinLimit;
354 sliderData->m_linearLowerLimit = m_lowerLinLimit;
355
356 sliderData->m_angularUpperLimit = m_upperAngLimit;
357 sliderData->m_angularLowerLimit = m_lowerAngLimit;
358
359 sliderData->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA;
360 sliderData->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame;
361
362 return btSliderConstraintDataName;
363 }
364
365
366
367 #endif //BT_SLIDER_CONSTRAINT_H
368
btSliderConstraint::setMaxLinMotorForce
void setMaxLinMotorForce(btScalar maxLinMotorForce)
Definition: btSliderConstraint.h:241
btSliderConstraint::getLinearPos
btScalar getLinearPos() const
Definition: btSliderConstraint.h:250
BT_SLIDER_FLAGS_CFM_LIMANG
Definition: btSliderConstraint.h:66
btSliderConstraintDoubleData::m_angularUpperLimit
double m_angularUpperLimit
Definition: btSliderConstraint.h:330
btSliderConstraint::setDampingDirLin
void setDampingDirLin(btScalar dampingDirLin)
Definition: btSliderConstraint.h:221
btSliderConstraint::m_dampingOrthoAng
btScalar m_dampingOrthoAng
Definition: btSliderConstraint.h:120
btSliderConstraint::setUpperLinLimit
void setUpperLinLimit(btScalar upperLimit)
Definition: btSliderConstraint.h:195
btSliderConstraint::setRestitutionOrthoLin
void setRestitutionOrthoLin(btScalar restitutionOrthoLin)
Definition: btSliderConstraint.h:232
BT_SLIDER_FLAGS_ERP_ORTANG
Definition: btSliderConstraint.h:63
btSliderConstraint::getMaxAngMotorForce
btScalar getMaxAngMotorForce()
Definition: btSliderConstraint.h:248
btSliderConstraintDoubleData::m_angularLowerLimit
double m_angularLowerLimit
Definition: btSliderConstraint.h:331
BT_SLIDER_FLAGS_ERP_LIMANG
Definition: btSliderConstraint.h:67
btSliderConstraint::m_cfmOrthoLin
btScalar m_cfmOrthoLin
Definition: btSliderConstraint.h:116
btSliderConstraint::setFrames
void setFrames(const btTransform &frameA, const btTransform &frameB)
Definition: btSliderConstraint.h:271
btSliderConstraint::setLowerLinLimit
void setLowerLinLimit(btScalar lowerLimit)
Definition: btSliderConstraint.h:193
btSliderConstraintData::m_typeConstraintData
btTypedConstraintData m_typeConstraintData
Definition: btSliderConstraint.h:305
btSliderConstraint::m_dampingDirLin
btScalar m_dampingDirLin
Definition: btSliderConstraint.h:95
btSliderConstraint::getRestitutionDirAng
btScalar getRestitutionDirAng()
Definition: btSliderConstraint.h:205
btSliderConstraint::setRestitutionLimAng
void setRestitutionLimAng(btScalar restitutionLimAng)
Definition: btSliderConstraint.h:229
btSliderConstraint::m_dampingOrthoLin
btScalar m_dampingOrthoLin
Definition: btSliderConstraint.h:115
btJacobianEntry
Jacobian entry is an abstraction that allows to describe constraints it can be used in combination wi...
Definition: btJacobianEntry.h:30
btTypedConstraint::btConstraintInfo2
Definition: btTypedConstraint.h:126
btSliderConstraint::getCalculatedTransformA
const btTransform & getCalculatedTransformA() const
Definition: btSliderConstraint.h:186
BT_SLIDER_FLAGS_CFM_DIRLIN
Definition: btSliderConstraint.h:56
btSliderConstraint::getCalculatedTransformB
const btTransform & getCalculatedTransformB() const
Definition: btSliderConstraint.h:187
btSliderConstraint::setLowerAngLimit
void setLowerAngLimit(btScalar lowerLimit)
Definition: btSliderConstraint.h:197
btSliderConstraint::setDampingLimAng
void setDampingLimAng(btScalar dampingLimAng)
Definition: btSliderConstraint.h:230
btSliderConstraint::m_cfmDirLin
btScalar m_cfmDirLin
Definition: btSliderConstraint.h:96
btVector3.h
btSliderConstraintData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
Definition: btSliderConstraint.h:303
btSliderConstraint::getFrameOffsetA
const btTransform & getFrameOffsetA() const
Definition: btSliderConstraint.h:188
btSliderConstraint::m_restitutionOrthoAng
btScalar m_restitutionOrthoAng
Definition: btSliderConstraint.h:119
btSliderConstraint::getRestitutionLimAng
btScalar getRestitutionLimAng()
Definition: btSliderConstraint.h:211
btSliderConstraint::serialize
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btSliderConstraint.h:344
btSliderConstraint::m_frameInA
btTransform m_frameInA
Definition: btSliderConstraint.h:77
btSliderConstraint::m_accumulatedAngMotorImpulse
btScalar m_accumulatedAngMotorImpulse
Definition: btSliderConstraint.h:161
btSliderConstraint::m_dampingDirAng
btScalar m_dampingDirAng
Definition: btSliderConstraint.h:100
btRigidBody::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btRigidBody.cpp:476
btSliderConstraint::getUseFrameOffset
bool getUseFrameOffset()
Definition: btSliderConstraint.h:268
btSliderConstraint::setSoftnessLimLin
void setSoftnessLimLin(btScalar softnessLimLin)
Definition: btSliderConstraint.h:225
btSliderConstraint::m_accumulatedLinMotorImpulse
btScalar m_accumulatedLinMotorImpulse
Definition: btSliderConstraint.h:156
btSliderConstraint::getSolveAngLimit
bool getSolveAngLimit()
Definition: btSliderConstraint.h:258
BT_SLIDER_FLAGS_CFM_DIRANG
Definition: btSliderConstraint.h:58
btSliderConstraint::setPoweredAngMotor
void setPoweredAngMotor(bool onOff)
Definition: btSliderConstraint.h:243
btSliderConstraint::getLowerLinLimit
btScalar getLowerLinLimit()
Definition: btSliderConstraint.h:192
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:81
btSliderConstraint::m_calculatedTransformB
btTransform m_calculatedTransformB
Definition: btSliderConstraint.h:136
btSliderConstraint::setRestitutionLimLin
void setRestitutionLimLin(btScalar restitutionLimLin)
Definition: btSliderConstraint.h:226
btSliderConstraint::getPoweredLinMotor
bool getPoweredLinMotor()
Definition: btSliderConstraint.h:238
btSliderConstraint::getLinDepth
btScalar getLinDepth()
Definition: btSliderConstraint.h:257
btSliderConstraint::m_relPosB
btVector3 m_relPosB
Definition: btSliderConstraint.h:145
btSliderConstraint::getAngularPos
btScalar getAngularPos() const
Definition: btSliderConstraint.h:251
btSliderConstraint::m_lowerLinLimit
btScalar m_lowerLinLimit
Definition: btSliderConstraint.h:82
btSliderConstraint::m_frameInB
btTransform m_frameInB
Definition: btSliderConstraint.h:78
btSliderConstraint::setUseFrameOffset
void setUseFrameOffset(bool frameOffsetOnOff)
Definition: btSliderConstraint.h:269
btSliderConstraint::m_targetLinMotorVelocity
btScalar m_targetLinMotorVelocity
Definition: btSliderConstraint.h:154
btSliderConstraint::setTargetAngMotorVelocity
void setTargetAngMotorVelocity(btScalar targetAngMotorVelocity)
Definition: btSliderConstraint.h:245
btSliderConstraint::m_relPosA
btVector3 m_relPosA
Definition: btSliderConstraint.h:144
btSliderConstraint::m_depth
btVector3 m_depth
Definition: btSliderConstraint.h:143
btSliderConstraint::setRestitutionDirLin
void setRestitutionDirLin(btScalar restitutionDirLin)
Definition: btSliderConstraint.h:220
btSliderConstraintDoubleData::m_linearLowerLimit
double m_linearLowerLimit
Definition: btSliderConstraint.h:328
btSliderConstraintData::m_linearLowerLimit
float m_linearLowerLimit
Definition: btSliderConstraint.h:310
btSliderConstraintData::m_rbBFrame
btTransformFloatData m_rbBFrame
Definition: btSliderConstraint.h:307
btSliderConstraintData::m_linearUpperLimit
float m_linearUpperLimit
Definition: btSliderConstraint.h:309
btSliderConstraint::getPoweredAngMotor
bool getPoweredAngMotor()
Definition: btSliderConstraint.h:244
btSliderConstraint::getDampingDirLin
btScalar getDampingDirLin()
Definition: btSliderConstraint.h:203
btSerializer
Definition: btSerializer.h:68
btSliderConstraint::m_upperLinLimit
btScalar m_upperLinLimit
Definition: btSliderConstraint.h:83
btSliderConstraintData::m_angularUpperLimit
float m_angularUpperLimit
Definition: btSliderConstraint.h:312
btSliderConstraint::getDampingOrthoLin
btScalar getDampingOrthoLin()
Definition: btSliderConstraint.h:215
btSliderConstraint::setPoweredLinMotor
void setPoweredLinMotor(bool onOff)
Definition: btSliderConstraint.h:237
BT_SLIDER_FLAGS_ERP_DIRLIN
Definition: btSliderConstraint.h:57
btSliderConstraint::setDampingLimLin
void setDampingLimLin(btScalar dampingLimLin)
Definition: btSliderConstraint.h:227
btSliderConstraint::getMaxLinMotorForce
btScalar getMaxLinMotorForce()
Definition: btSliderConstraint.h:242
btTypedConstraint.h
btSliderConstraint::setDampingDirAng
void setDampingDirAng(btScalar dampingDirAng)
Definition: btSliderConstraint.h:224
btSliderConstraint::setSoftnessDirAng
void setSoftnessDirAng(btScalar softnessDirAng)
Definition: btSliderConstraint.h:222
btSliderConstraint::setSoftnessOrthoAng
void setSoftnessOrthoAng(btScalar softnessOrthoAng)
Definition: btSliderConstraint.h:234
btSliderConstraint::getAngDepth
btScalar getAngDepth()
Definition: btSliderConstraint.h:259
btSliderConstraint::setTargetLinMotorVelocity
void setTargetLinMotorVelocity(btScalar targetLinMotorVelocity)
Definition: btSliderConstraint.h:239
BT_SLIDER_FLAGS_ERP_LIMLIN
Definition: btSliderConstraint.h:65
btSliderConstraint::m_projPivotInW
btVector3 m_projPivotInW
Definition: btSliderConstraint.h:141
btSliderConstraint::m_restitutionLimLin
btScalar m_restitutionLimLin
Definition: btSliderConstraint.h:104
btSliderConstraint::getUpperAngLimit
btScalar getUpperAngLimit()
Definition: btSliderConstraint.h:198
btSliderConstraint::m_solveLinLim
bool m_solveLinLim
Definition: btSliderConstraint.h:124
btSliderConstraint::getFlags
virtual int getFlags() const
Definition: btSliderConstraint.h:286
btSliderConstraint::m_softnessLimLin
btScalar m_softnessLimLin
Definition: btSliderConstraint.h:103
btSliderConstraint::m_dampingLimLin
btScalar m_dampingLimLin
Definition: btSliderConstraint.h:105
btSliderConstraintData::m_useLinearReferenceFrameA
int m_useLinearReferenceFrameA
Definition: btSliderConstraint.h:315
btSliderConstraint::setSoftnessLimAng
void setSoftnessLimAng(btScalar softnessLimAng)
Definition: btSliderConstraint.h:228
btSliderConstraintDoubleData::m_useOffsetForConstraintFrame
int m_useOffsetForConstraintFrame
Definition: btSliderConstraint.h:334
btSliderConstraint::m_restitutionLimAng
btScalar m_restitutionLimAng
Definition: btSliderConstraint.h:109
btSliderConstraint::m_dampingLimAng
btScalar m_dampingLimAng
Definition: btSliderConstraint.h:110
BT_SLIDER_FLAGS_ERP_DIRANG
Definition: btSliderConstraint.h:59
btSliderConstraint::setDampingOrthoLin
void setDampingOrthoLin(btScalar dampingOrthoLin)
Definition: btSliderConstraint.h:233
btSliderConstraint::m_restitutionDirAng
btScalar m_restitutionDirAng
Definition: btSliderConstraint.h:99
btSliderConstraintData2
#define btSliderConstraintData2
Definition: btSliderConstraint.h:34
btSliderConstraint::getDampingLimAng
btScalar getDampingLimAng()
Definition: btSliderConstraint.h:212
btSliderConstraint::m_softnessDirLin
btScalar m_softnessDirLin
Definition: btSliderConstraint.h:93
btSliderConstraint::setUpperAngLimit
void setUpperAngLimit(btScalar upperLimit)
Definition: btSliderConstraint.h:199
btSliderConstraint::getRestitutionDirLin
btScalar getRestitutionDirLin()
Definition: btSliderConstraint.h:202
btTypedConstraintDoubleData
Definition: btTypedConstraint.h:416
btSliderConstraint::getSoftnessDirAng
btScalar getSoftnessDirAng()
Definition: btSliderConstraint.h:204
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:62
btSliderConstraintDoubleData::m_linearUpperLimit
double m_linearUpperLimit
Definition: btSliderConstraint.h:327
btSliderConstraintDoubleData::m_useLinearReferenceFrameA
int m_useLinearReferenceFrameA
Definition: btSliderConstraint.h:333
btSliderConstraint::getSoftnessDirLin
btScalar getSoftnessDirLin()
Definition: btSliderConstraint.h:201
btSliderConstraint::m_realPivotBInW
btVector3 m_realPivotBInW
Definition: btSliderConstraint.h:140
BT_SLIDER_FLAGS_CFM_ORTANG
Definition: btSliderConstraint.h:62
btSliderConstraint::m_softnessOrthoLin
btScalar m_softnessOrthoLin
Definition: btSliderConstraint.h:113
btTypedConstraintData
this structure is not used, except for loading pre-2.82 .bullet files
Definition: btTypedConstraint.h:393
btSliderConstraint::m_targetAngMotorVelocity
btScalar m_targetAngMotorVelocity
Definition: btSliderConstraint.h:159
btSliderConstraint::m_useOffsetForConstraintFrame
bool m_useOffsetForConstraintFrame
Definition: btSliderConstraint.h:76
btSliderConstraintDoubleData
Definition: btSliderConstraint.h:321
btJacobianEntry.h
btSliderConstraint::getUpperLinLimit
btScalar getUpperLinLimit()
Definition: btSliderConstraint.h:194
btSliderConstraint::getTargetLinMotorVelocity
btScalar getTargetLinMotorVelocity()
Definition: btSliderConstraint.h:240
btSliderConstraint::m_upperAngLimit
btScalar m_upperAngLimit
Definition: btSliderConstraint.h:86
btSliderConstraint::m_cfmLimAng
btScalar m_cfmLimAng
Definition: btSliderConstraint.h:111
btSliderConstraint::setSoftnessOrthoLin
void setSoftnessOrthoLin(btScalar softnessOrthoLin)
Definition: btSliderConstraint.h:231
btSliderConstraint::m_cfmDirAng
btScalar m_cfmDirAng
Definition: btSliderConstraint.h:101
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:83
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:82
btSliderConstraint::getRestitutionOrthoAng
btScalar getRestitutionOrthoAng()
Definition: btSliderConstraint.h:217
BT_SLIDER_FLAGS_ERP_ORTLIN
Definition: btSliderConstraint.h:61
btSliderConstraint::getSoftnessOrthoLin
btScalar getSoftnessOrthoLin()
Definition: btSliderConstraint.h:213
btNormalizeAngle
btScalar btNormalizeAngle(btScalar angleInRadians)
Definition: btScalar.h:759
btSliderConstraint::getSolveLinLimit
bool getSolveLinLimit()
Definition: btSliderConstraint.h:256
btSliderConstraint::getUseLinearReferenceFrameA
bool getUseLinearReferenceFrameA()
Definition: btSliderConstraint.h:200
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:34
btSliderConstraint::setDampingOrthoAng
void setDampingOrthoAng(btScalar dampingOrthoAng)
Definition: btSliderConstraint.h:236
btSliderConstraintDataName
#define btSliderConstraintDataName
Definition: btSliderConstraint.h:35
btSliderConstraint::m_flags
int m_flags
Definition: btSliderConstraint.h:127
btSliderConstraint::m_useLinearReferenceFrameA
bool m_useLinearReferenceFrameA
Definition: btSliderConstraint.h:80
BT_SLIDER_FLAGS_CFM_ORTLIN
Definition: btSliderConstraint.h:60
btSliderConstraint::getTargetAngMotorVelocity
btScalar getTargetAngMotorVelocity()
Definition: btSliderConstraint.h:246
btTypedConstraint::serialize
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btTypedConstraint.cpp:110
btSliderConstraint::m_angDepth
btScalar m_angDepth
Definition: btSliderConstraint.h:150
btSliderConstraint::m_cfmOrthoAng
btScalar m_cfmOrthoAng
Definition: btSliderConstraint.h:121
btSliderConstraint::m_calculatedTransformA
btTransform m_calculatedTransformA
Definition: btSliderConstraint.h:135
btTypedConstraint
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition: btTypedConstraint.h:78
btSliderConstraint::setRestitutionDirAng
void setRestitutionDirAng(btScalar restitutionDirAng)
Definition: btSliderConstraint.h:223
btSliderConstraint::m_cfmLimLin
btScalar m_cfmLimLin
Definition: btSliderConstraint.h:106
btSliderConstraintData::m_rbAFrame
btTransformFloatData m_rbAFrame
Definition: btSliderConstraint.h:306
btSliderConstraint::getSoftnessLimLin
btScalar getSoftnessLimLin()
Definition: btSliderConstraint.h:207
btSliderConstraint::m_poweredLinMotor
bool m_poweredLinMotor
Definition: btSliderConstraint.h:153
btTransformFloatData
for serialization
Definition: btTransform.h:253
btSliderConstraint::getRigidBodyA
const btRigidBody & getRigidBodyA() const
Definition: btSliderConstraint.h:184
btSliderConstraint::getDampingOrthoAng
btScalar getDampingOrthoAng()
Definition: btSliderConstraint.h:218
btSliderConstraint::setSoftnessDirLin
void setSoftnessDirLin(btScalar softnessDirLin)
Definition: btSliderConstraint.h:219
btSliderConstraint::m_realPivotAInW
btVector3 m_realPivotAInW
Definition: btSliderConstraint.h:139
btSliderConstraint::m_poweredAngMotor
bool m_poweredAngMotor
Definition: btSliderConstraint.h:158
btSliderConstraint::m_softnessDirAng
btScalar m_softnessDirAng
Definition: btSliderConstraint.h:98
BT_DECLARE_ALIGNED_ALLOCATOR
#define BT_DECLARE_ALIGNED_ALLOCATOR()
Definition: btScalar.h:403
btSliderConstraint::m_linPos
btScalar m_linPos
Definition: btSliderConstraint.h:147
btSliderConstraint::getFrameOffsetB
const btTransform & getFrameOffsetB() const
Definition: btSliderConstraint.h:189
btSliderConstraintDoubleData::m_typeConstraintData
btTypedConstraintDoubleData m_typeConstraintData
Definition: btSliderConstraint.h:323
btSliderConstraint::m_useSolveConstraintObsolete
bool m_useSolveConstraintObsolete
for backwards compatibility during the transition to &#39;getInfo/getInfo2&#39;
Definition: btSliderConstraint.h:75
btSliderConstraint::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btSliderConstraint.h:338
btSliderConstraint::m_lowerAngLimit
btScalar m_lowerAngLimit
Definition: btSliderConstraint.h:85
btSliderConstraint
Definition: btSliderConstraint.h:71
btSliderConstraint::m_maxLinMotorForce
btScalar m_maxLinMotorForce
Definition: btSliderConstraint.h:155
btSliderConstraintDoubleData::m_rbBFrame
btTransformDoubleData m_rbBFrame
Definition: btSliderConstraint.h:325
btSliderConstraint::m_timeStep
btScalar m_timeStep
Definition: btSliderConstraint.h:134
btSliderConstraint::m_sliderAxis
btVector3 m_sliderAxis
Definition: btSliderConstraint.h:138
btSliderConstraint::getLowerAngLimit
btScalar getLowerAngLimit()
Definition: btSliderConstraint.h:196
btSliderConstraint::setMaxAngMotorForce
void setMaxAngMotorForce(btScalar maxAngMotorForce)
Definition: btSliderConstraint.h:247
btSliderConstraint::setRestitutionOrthoAng
void setRestitutionOrthoAng(btScalar restitutionOrthoAng)
Definition: btSliderConstraint.h:235
btSliderConstraint::getRestitutionOrthoLin
btScalar getRestitutionOrthoLin()
Definition: btSliderConstraint.h:214
btSliderConstraint::getSoftnessOrthoAng
btScalar getSoftnessOrthoAng()
Definition: btSliderConstraint.h:216
btSliderConstraint::m_angPos
btScalar m_angPos
Definition: btSliderConstraint.h:148
btSliderConstraint::m_restitutionDirLin
btScalar m_restitutionDirLin
Definition: btSliderConstraint.h:94
btSliderConstraint::m_maxAngMotorForce
btScalar m_maxAngMotorForce
Definition: btSliderConstraint.h:160
btSliderConstraint::m_solveAngLim
bool m_solveAngLim
Definition: btSliderConstraint.h:125
BT_SLIDER_FLAGS_CFM_LIMLIN
Definition: btSliderConstraint.h:64
btSliderConstraintDoubleData::m_rbAFrame
btTransformDoubleData m_rbAFrame
Definition: btSliderConstraint.h:324
btTypedConstraint::btConstraintInfo1
Definition: btTypedConstraint.h:120
btSliderConstraint::m_softnessLimAng
btScalar m_softnessLimAng
Definition: btSliderConstraint.h:108
btSliderConstraint::getFrameOffsetB
btTransform & getFrameOffsetB()
Definition: btSliderConstraint.h:191
btSliderConstraint::getDampingLimLin
btScalar getDampingLimLin()
Definition: btSliderConstraint.h:209
btSliderConstraint::m_restitutionOrthoLin
btScalar m_restitutionOrthoLin
Definition: btSliderConstraint.h:114
btSliderConstraint::m_softnessOrthoAng
btScalar m_softnessOrthoAng
Definition: btSliderConstraint.h:118
btSliderConstraint::getRestitutionLimLin
btScalar getRestitutionLimLin()
Definition: btSliderConstraint.h:208
btTransformDoubleData
Definition: btTransform.h:259
btSliderConstraintData::m_angularLowerLimit
float m_angularLowerLimit
Definition: btSliderConstraint.h:313
btSliderConstraint::getSoftnessLimAng
btScalar getSoftnessLimAng()
Definition: btSliderConstraint.h:210
btSliderConstraint::getFrameOffsetA
btTransform & getFrameOffsetA()
Definition: btSliderConstraint.h:190
btSliderConstraint::getRigidBodyB
const btRigidBody & getRigidBodyB() const
Definition: btSliderConstraint.h:185
btRigidBody::serialize
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btRigidBody.cpp:483
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:292
btSliderConstraintData::m_useOffsetForConstraintFrame
int m_useOffsetForConstraintFrame
Definition: btSliderConstraint.h:316
btSliderConstraint::getDampingDirAng
btScalar getDampingDirAng()
Definition: btSliderConstraint.h:206
btSliderConstraint::m_delta
btVector3 m_delta
Definition: btSliderConstraint.h:142
btSliderFlags
btSliderFlags
Definition: btSliderConstraint.h:54
btSliderConstraint::m_kAngle
btScalar m_kAngle
Definition: btSliderConstraint.h:151
btScalar.h