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

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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