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

Bullet Collision Detection & Physics Library

btSoftBody.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 */
16
17 #ifndef _BT_SOFT_BODY_H
18 #define _BT_SOFT_BODY_H
19
20 #include "LinearMath/btAlignedObjectArray.h"
21 #include "LinearMath/btTransform.h"
22 #include "LinearMath/btIDebugDraw.h"
23 #include "LinearMath/btVector3.h"
24 #include "BulletDynamics/Dynamics/btRigidBody.h"
25
26 #include "BulletCollision/CollisionShapes/btConcaveShape.h"
27 #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
28 #include "btSparseSDF.h"
29 #include "BulletCollision/BroadphaseCollision/btDbvt.h"
30 #include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
31 #include "BulletDynamics/Featherstone/btMultiBodyConstraint.h"
32 //#ifdef BT_USE_DOUBLE_PRECISION
33 //#define btRigidBodyData btRigidBodyDoubleData
34 //#define btRigidBodyDataName "btRigidBodyDoubleData"
35 //#else
36 #define btSoftBodyData btSoftBodyFloatData
37 #define btSoftBodyDataName "btSoftBodyFloatData"
38 //#endif //BT_USE_DOUBLE_PRECISION
39
40 class btBroadphaseInterface;
41 class btDispatcher;
42 class btSoftBodySolver;
43
44 /* btSoftBodyWorldInfo */
45 struct btSoftBodyWorldInfo
46 {
47 btScalar air_density;
48 btScalar water_density;
49 btScalar water_offset;
50 btScalar m_maxDisplacement;
51 btVector3 water_normal;
52 btBroadphaseInterface* m_broadphase;
53 btDispatcher* m_dispatcher;
54 btVector3 m_gravity;
55 btSparseSdf<3> m_sparsesdf;
56
57 btSoftBodyWorldInfo()
58 : air_density((btScalar)1.2),
59 water_density(0),
60 water_offset(0),
61 m_maxDisplacement(1000.f), //avoid soft body from 'exploding' so use some upper threshold of maximum motion that a node can travel per frame
62 water_normal(0, 0, 0),
63 m_broadphase(0),
64 m_dispatcher(0),
65 m_gravity(0, -10, 0)
66 {
67 }
68 };
69
72 class btSoftBody : public btCollisionObject
73 {
74 public:
75 btAlignedObjectArray<const class btCollisionObject*> m_collisionDisabledObjects;
76
77 // The solver object that handles this soft body
78 btSoftBodySolver* m_softBodySolver;
79
80 //
81 // Enumerations
82 //
83
85 struct eAeroModel
86 {
87 enum _
88 {
89 V_Point,
90 V_TwoSided,
91 V_TwoSidedLiftDrag,
92 V_OneSided,
93 F_TwoSided,
94 F_TwoSidedLiftDrag,
95 F_OneSided,
96 END
97 };
98 };
99
101 struct eVSolver
102 {
103 enum _
104 {
105 Linear,
106 END
107 };
108 };
109
111 struct ePSolver
112 {
113 enum _
114 {
115 Linear,
116 Anchors,
117 RContacts,
118 SContacts,
119 END
120 };
121 };
122
124 struct eSolverPresets
125 {
126 enum _
127 {
128 Positions,
129 Velocities,
130 Default = Positions,
131 END
132 };
133 };
134
136 struct eFeature
137 {
138 enum _
139 {
140 None,
141 Node,
142 Link,
143 Face,
144 Tetra,
145 END
146 };
147 };
148
149 typedef btAlignedObjectArray<eVSolver::_> tVSolverArray;
150 typedef btAlignedObjectArray<ePSolver::_> tPSolverArray;
151
152 //
153 // Flags
154 //
155
157 struct fCollision
158 {
159 enum _
160 {
161 RVSmask = 0x000f,
162 SDF_RS = 0x0001,
163 CL_RS = 0x0002,
164 SDF_RD = 0x0003,
165 SDF_RDF = 0x0004,
166
167 SVSmask = 0x00F0,
168 VF_SS = 0x0010,
169 CL_SS = 0x0020,
170 CL_SELF = 0x0040,
171 VF_DD = 0x0050,
172 /* presets */
173 Default = SDF_RS,
174 END
175 };
176 };
177
179 struct fMaterial
180 {
181 enum _
182 {
183 DebugDraw = 0x0001,
184 /* presets */
185 Default = DebugDraw,
186 END
187 };
188 };
189
190 //
191 // API Types
192 //
193
194 /* sRayCast */
195 struct sRayCast
196 {
197 btSoftBody* body;
198 eFeature::_ feature;
199 int index;
200 btScalar fraction;
201 };
202
203 /* ImplicitFn */
204 struct ImplicitFn
205 {
206 virtual ~ImplicitFn() {}
207 virtual btScalar Eval(const btVector3& x) = 0;
208 };
209
210 //
211 // Internal types
212 //
213
214 typedef btAlignedObjectArray<btScalar> tScalarArray;
215 typedef btAlignedObjectArray<btVector3> tVector3Array;
216
217 /* sCti is Softbody contact info */
218 struct sCti
219 {
220 const btCollisionObject* m_colObj; /* Rigid body */
221 btVector3 m_normal; /* Outward normal */
222 btScalar m_offset; /* Offset from origin */
223 btVector3 m_bary; /* Barycentric weights for faces */
224 };
225
226 /* sMedium */
227 struct sMedium
228 {
229 btVector3 m_velocity; /* Velocity */
230 btScalar m_pressure; /* Pressure */
231 btScalar m_density; /* Density */
232 };
233
234 /* Base type */
235 struct Element
236 {
237 void* m_tag; // User data
238 Element() : m_tag(0) {}
239 };
240 /* Material */
241 struct Material : Element
242 {
243 btScalar m_kLST; // Linear stiffness coefficient [0,1]
244 btScalar m_kAST; // Area/Angular stiffness coefficient [0,1]
245 btScalar m_kVST; // Volume stiffness coefficient [0,1]
246 int m_flags; // Flags
247 };
248
249 /* Feature */
250 struct Feature : Element
251 {
252 Material* m_material; // Material
253 };
254 /* Node */
255 struct Node : Feature
256 {
257 btVector3 m_x; // Position
258 btVector3 m_q; // Previous step position/Test position
259 btVector3 m_v; // Velocity
260 btVector3 m_vsplit; // Temporary Velocity in addintion to velocity used in split impulse
261 btVector3 m_vn; // Previous step velocity
262 btVector3 m_f; // Force accumulator
263 btVector3 m_n; // Normal
264 btScalar m_im; // 1/mass
265 btScalar m_area; // Area
266 btDbvtNode* m_leaf; // Leaf data
267 int m_battach : 1; // Attached
268 int index;
269 };
270 /* Link */
271 ATTRIBUTE_ALIGNED16(struct)
272 Link : Feature
273 {
274 btVector3 m_c3; // gradient
275 Node* m_n[2]; // Node pointers
276 btScalar m_rl; // Rest length
277 int m_bbending : 1; // Bending link
278 btScalar m_c0; // (ima+imb)*kLST
279 btScalar m_c1; // rl^2
280 btScalar m_c2; // |gradient|^2/c0
281
282 BT_DECLARE_ALIGNED_ALLOCATOR();
283 };
284 /* Face */
285 struct Face : Feature
286 {
287 Node* m_n[3]; // Node pointers
288 btVector3 m_normal; // Normal
289 btScalar m_ra; // Rest area
290 btDbvtNode* m_leaf; // Leaf data
291 btVector4 m_pcontact; // barycentric weights of the persistent contact
292 int m_index;
293 };
294 /* Tetra */
295 struct Tetra : Feature
296 {
297 Node* m_n[4]; // Node pointers
298 btScalar m_rv; // Rest volume
299 btDbvtNode* m_leaf; // Leaf data
300 btVector3 m_c0[4]; // gradients
301 btScalar m_c1; // (4*kVST)/(im0+im1+im2+im3)
302 btScalar m_c2; // m_c1/sum(|g0..3|^2)
303 btMatrix3x3 m_Dm_inverse; // rest Dm^-1
304 btMatrix3x3 m_F;
305 btScalar m_element_measure;
306 };
307
308 /* TetraScratch */
309 struct TetraScratch
310 {
311 btMatrix3x3 m_F; // deformation gradient F
312 btScalar m_trace; // trace of F^T * F
313 btScalar m_J; // det(F)
314 btMatrix3x3 m_cofF; // cofactor of F
315 };
316
317 /* RContact */
318 struct RContact
319 {
320 sCti m_cti; // Contact infos
321 Node* m_node; // Owner node
322 btMatrix3x3 m_c0; // Impulse matrix
323 btVector3 m_c1; // Relative anchor
324 btScalar m_c2; // ima*dt
325 btScalar m_c3; // Friction
326 btScalar m_c4; // Hardness
327
328 // jacobians and unit impulse responses for multibody
329 btMultiBodyJacobianData jacobianData_normal;
330 btMultiBodyJacobianData jacobianData_t1;
331 btMultiBodyJacobianData jacobianData_t2;
332 btVector3 t1;
333 btVector3 t2;
334 };
335
336 class DeformableRigidContact
337 {
338 public:
339 sCti m_cti; // Contact infos
340 btMatrix3x3 m_c0; // Impulse matrix
341 btVector3 m_c1; // Relative anchor
342 btScalar m_c2; // inverse mass of node/face
343 btScalar m_c3; // Friction
344 btScalar m_c4; // Hardness
345
346 // jacobians and unit impulse responses for multibody
347 btMultiBodyJacobianData jacobianData_normal;
348 btMultiBodyJacobianData jacobianData_t1;
349 btMultiBodyJacobianData jacobianData_t2;
350 btVector3 t1;
351 btVector3 t2;
352 };
353
354 class DeformableNodeRigidContact : public DeformableRigidContact
355 {
356 public:
357 Node* m_node; // Owner node
358 };
359
360 class DeformableNodeRigidAnchor : public DeformableNodeRigidContact
361 {
362 public:
363 btVector3 m_local; // Anchor position in body space
364 };
365
366 class DeformableFaceRigidContact : public DeformableRigidContact
367 {
368 public:
369 Face* m_face; // Owner face
370 btVector3 m_contactPoint; // Contact point
371 btVector3 m_bary; // Barycentric weights
372 btVector3 m_weights; // v_contactPoint * m_weights[i] = m_face->m_node[i]->m_v;
373 };
374
375 struct DeformableFaceNodeContact
376 {
377 Node* m_node; // Node
378 Face* m_face; // Face
379 btVector3 m_bary; // Barycentric weights
380 btVector3 m_weights; // v_contactPoint * m_weights[i] = m_face->m_node[i]->m_v;
381 btVector3 m_normal; // Normal
382 btScalar m_margin; // Margin
383 btScalar m_friction; // Friction
384 btScalar m_imf; // inverse mass of the face at contact point
385 btScalar m_c0; // scale of the impulse matrix;
386 };
387
388 /* SContact */
389 struct SContact
390 {
391 Node* m_node; // Node
392 Face* m_face; // Face
393 btVector3 m_weights; // Weigths
394 btVector3 m_normal; // Normal
395 btScalar m_margin; // Margin
396 btScalar m_friction; // Friction
397 btScalar m_cfm[2]; // Constraint force mixing
398 };
399 /* Anchor */
400 struct Anchor
401 {
402 Node* m_node; // Node pointer
403 btVector3 m_local; // Anchor position in body space
404 btRigidBody* m_body; // Body
405 btScalar m_influence;
406 btMatrix3x3 m_c0; // Impulse matrix
407 btVector3 m_c1; // Relative anchor
408 btScalar m_c2; // ima*dt
409 };
410 /* Note */
411 struct Note : Element
412 {
413 const char* m_text; // Text
414 btVector3 m_offset; // Offset
415 int m_rank; // Rank
416 Node* m_nodes[4]; // Nodes
417 btScalar m_coords[4]; // Coordinates
418 };
419 /* Pose */
420 struct Pose
421 {
422 bool m_bvolume; // Is valid
423 bool m_bframe; // Is frame
424 btScalar m_volume; // Rest volume
425 tVector3Array m_pos; // Reference positions
426 tScalarArray m_wgh; // Weights
427 btVector3 m_com; // COM
428 btMatrix3x3 m_rot; // Rotation
429 btMatrix3x3 m_scl; // Scale
430 btMatrix3x3 m_aqq; // Base scaling
431 };
432 /* Cluster */
433 struct Cluster
434 {
435 tScalarArray m_masses;
436 btAlignedObjectArray<Node*> m_nodes;
437 tVector3Array m_framerefs;
438 btTransform m_framexform;
439 btScalar m_idmass;
440 btScalar m_imass;
441 btMatrix3x3 m_locii;
442 btMatrix3x3 m_invwi;
443 btVector3 m_com;
444 btVector3 m_vimpulses[2];
445 btVector3 m_dimpulses[2];
446 int m_nvimpulses;
447 int m_ndimpulses;
448 btVector3 m_lv;
449 btVector3 m_av;
450 btDbvtNode* m_leaf;
451 btScalar m_ndamping; /* Node damping */
452 btScalar m_ldamping; /* Linear damping */
453 btScalar m_adamping; /* Angular damping */
454 btScalar m_matching;
455 btScalar m_maxSelfCollisionImpulse;
456 btScalar m_selfCollisionImpulseFactor;
457 bool m_containsAnchor;
458 bool m_collide;
459 int m_clusterIndex;
460 Cluster() : m_leaf(0), m_ndamping(0), m_ldamping(0), m_adamping(0), m_matching(0), m_maxSelfCollisionImpulse(100.f), m_selfCollisionImpulseFactor(0.01f), m_containsAnchor(false)
461 {
462 }
463 };
464 /* Impulse */
465 struct Impulse
466 {
467 btVector3 m_velocity;
468 btVector3 m_drift;
469 int m_asVelocity : 1;
470 int m_asDrift : 1;
471 Impulse() : m_velocity(0, 0, 0), m_drift(0, 0, 0), m_asVelocity(0), m_asDrift(0) {}
472 Impulse operator-() const
473 {
474 Impulse i = *this;
475 i.m_velocity = -i.m_velocity;
476 i.m_drift = -i.m_drift;
477 return (i);
478 }
479 Impulse operator*(btScalar x) const
480 {
481 Impulse i = *this;
482 i.m_velocity *= x;
483 i.m_drift *= x;
484 return (i);
485 }
486 };
487 /* Body */
488 struct Body
489 {
490 Cluster* m_soft;
491 btRigidBody* m_rigid;
492 const btCollisionObject* m_collisionObject;
493
494 Body() : m_soft(0), m_rigid(0), m_collisionObject(0) {}
495 Body(Cluster* p) : m_soft(p), m_rigid(0), m_collisionObject(0) {}
496 Body(const btCollisionObject* colObj) : m_soft(0), m_collisionObject(colObj)
497 {
498 m_rigid = (btRigidBody*)btRigidBody::upcast(m_collisionObject);
499 }
500
501 void activate() const
502 {
503 if (m_rigid)
504 m_rigid->activate();
505 if (m_collisionObject)
506 m_collisionObject->activate();
507 }
508 const btMatrix3x3& invWorldInertia() const
509 {
510 static const btMatrix3x3 iwi(0, 0, 0, 0, 0, 0, 0, 0, 0);
511 if (m_rigid) return (m_rigid->getInvInertiaTensorWorld());
512 if (m_soft) return (m_soft->m_invwi);
513 return (iwi);
514 }
515 btScalar invMass() const
516 {
517 if (m_rigid) return (m_rigid->getInvMass());
518 if (m_soft) return (m_soft->m_imass);
519 return (0);
520 }
521 const btTransform& xform() const
522 {
523 static const btTransform identity = btTransform::getIdentity();
524 if (m_collisionObject) return (m_collisionObject->getWorldTransform());
525 if (m_soft) return (m_soft->m_framexform);
526 return (identity);
527 }
528 btVector3 linearVelocity() const
529 {
530 if (m_rigid) return (m_rigid->getLinearVelocity());
531 if (m_soft) return (m_soft->m_lv);
532 return (btVector3(0, 0, 0));
533 }
534 btVector3 angularVelocity(const btVector3& rpos) const
535 {
536 if (m_rigid) return (btCross(m_rigid->getAngularVelocity(), rpos));
537 if (m_soft) return (btCross(m_soft->m_av, rpos));
538 return (btVector3(0, 0, 0));
539 }
540 btVector3 angularVelocity() const
541 {
542 if (m_rigid) return (m_rigid->getAngularVelocity());
543 if (m_soft) return (m_soft->m_av);
544 return (btVector3(0, 0, 0));
545 }
546 btVector3 velocity(const btVector3& rpos) const
547 {
548 return (linearVelocity() + angularVelocity(rpos));
549 }
550 void applyVImpulse(const btVector3& impulse, const btVector3& rpos) const
551 {
552 if (m_rigid) m_rigid->applyImpulse(impulse, rpos);
553 if (m_soft) btSoftBody::clusterVImpulse(m_soft, rpos, impulse);
554 }
555 void applyDImpulse(const btVector3& impulse, const btVector3& rpos) const
556 {
557 if (m_rigid) m_rigid->applyImpulse(impulse, rpos);
558 if (m_soft) btSoftBody::clusterDImpulse(m_soft, rpos, impulse);
559 }
560 void applyImpulse(const Impulse& impulse, const btVector3& rpos) const
561 {
562 if (impulse.m_asVelocity)
563 {
564 // printf("impulse.m_velocity = %f,%f,%f\n",impulse.m_velocity.getX(),impulse.m_velocity.getY(),impulse.m_velocity.getZ());
565 applyVImpulse(impulse.m_velocity, rpos);
566 }
567 if (impulse.m_asDrift)
568 {
569 // printf("impulse.m_drift = %f,%f,%f\n",impulse.m_drift.getX(),impulse.m_drift.getY(),impulse.m_drift.getZ());
570 applyDImpulse(impulse.m_drift, rpos);
571 }
572 }
573 void applyVAImpulse(const btVector3& impulse) const
574 {
575 if (m_rigid) m_rigid->applyTorqueImpulse(impulse);
576 if (m_soft) btSoftBody::clusterVAImpulse(m_soft, impulse);
577 }
578 void applyDAImpulse(const btVector3& impulse) const
579 {
580 if (m_rigid) m_rigid->applyTorqueImpulse(impulse);
581 if (m_soft) btSoftBody::clusterDAImpulse(m_soft, impulse);
582 }
583 void applyAImpulse(const Impulse& impulse) const
584 {
585 if (impulse.m_asVelocity) applyVAImpulse(impulse.m_velocity);
586 if (impulse.m_asDrift) applyDAImpulse(impulse.m_drift);
587 }
588 void applyDCImpulse(const btVector3& impulse) const
589 {
590 if (m_rigid) m_rigid->applyCentralImpulse(impulse);
591 if (m_soft) btSoftBody::clusterDCImpulse(m_soft, impulse);
592 }
593 };
594 /* Joint */
595 struct Joint
596 {
597 struct eType
598 {
599 enum _
600 {
601 Linear = 0,
602 Angular,
603 Contact
604 };
605 };
606 struct Specs
607 {
608 Specs() : erp(1), cfm(1), split(1) {}
609 btScalar erp;
610 btScalar cfm;
611 btScalar split;
612 };
613 Body m_bodies[2];
614 btVector3 m_refs[2];
615 btScalar m_cfm;
616 btScalar m_erp;
617 btScalar m_split;
618 btVector3 m_drift;
619 btVector3 m_sdrift;
620 btMatrix3x3 m_massmatrix;
621 bool m_delete;
622 virtual ~Joint() {}
623 Joint() : m_delete(false) {}
624 virtual void Prepare(btScalar dt, int iterations);
625 virtual void Solve(btScalar dt, btScalar sor) = 0;
626 virtual void Terminate(btScalar dt) = 0;
627 virtual eType::_ Type() const = 0;
628 };
629 /* LJoint */
630 struct LJoint : Joint
631 {
632 struct Specs : Joint::Specs
633 {
634 btVector3 position;
635 };
636 btVector3 m_rpos[2];
637 void Prepare(btScalar dt, int iterations);
638 void Solve(btScalar dt, btScalar sor);
639 void Terminate(btScalar dt);
640 eType::_ Type() const { return (eType::Linear); }
641 };
642 /* AJoint */
643 struct AJoint : Joint
644 {
645 struct IControl
646 {
647 virtual ~IControl() {}
648 virtual void Prepare(AJoint*) {}
649 virtual btScalar Speed(AJoint*, btScalar current) { return (current); }
650 static IControl* Default()
651 {
652 static IControl def;
653 return (&def);
654 }
655 };
656 struct Specs : Joint::Specs
657 {
658 Specs() : icontrol(IControl::Default()) {}
659 btVector3 axis;
660 IControl* icontrol;
661 };
662 btVector3 m_axis[2];
663 IControl* m_icontrol;
664 void Prepare(btScalar dt, int iterations);
665 void Solve(btScalar dt, btScalar sor);
666 void Terminate(btScalar dt);
667 eType::_ Type() const { return (eType::Angular); }
668 };
669 /* CJoint */
670 struct CJoint : Joint
671 {
672 int m_life;
673 int m_maxlife;
674 btVector3 m_rpos[2];
675 btVector3 m_normal;
676 btScalar m_friction;
677 void Prepare(btScalar dt, int iterations);
678 void Solve(btScalar dt, btScalar sor);
679 void Terminate(btScalar dt);
680 eType::_ Type() const { return (eType::Contact); }
681 };
682 /* Config */
683 struct Config
684 {
685 eAeroModel::_ aeromodel; // Aerodynamic model (default: V_Point)
686 btScalar kVCF; // Velocities correction factor (Baumgarte)
687 btScalar kDP; // Damping coefficient [0,1]
688 btScalar kDG; // Drag coefficient [0,+inf]
689 btScalar kLF; // Lift coefficient [0,+inf]
690 btScalar kPR; // Pressure coefficient [-inf,+inf]
691 btScalar kVC; // Volume conversation coefficient [0,+inf]
692 btScalar kDF; // Dynamic friction coefficient [0,1]
693 btScalar kMT; // Pose matching coefficient [0,1]
694 btScalar kCHR; // Rigid contacts hardness [0,1]
695 btScalar kKHR; // Kinetic contacts hardness [0,1]
696 btScalar kSHR; // Soft contacts hardness [0,1]
697 btScalar kAHR; // Anchors hardness [0,1]
698 btScalar kSRHR_CL; // Soft vs rigid hardness [0,1] (cluster only)
699 btScalar kSKHR_CL; // Soft vs kinetic hardness [0,1] (cluster only)
700 btScalar kSSHR_CL; // Soft vs soft hardness [0,1] (cluster only)
701 btScalar kSR_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
702 btScalar kSK_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
703 btScalar kSS_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
704 btScalar maxvolume; // Maximum volume ratio for pose
705 btScalar timescale; // Time scale
706 int viterations; // Velocities solver iterations
707 int piterations; // Positions solver iterations
708 int diterations; // Drift solver iterations
709 int citerations; // Cluster solver iterations
710 int collisions; // Collisions flags
711 tVSolverArray m_vsequence; // Velocity solvers sequence
712 tPSolverArray m_psequence; // Position solvers sequence
713 tPSolverArray m_dsequence; // Drift solvers sequence
714 btScalar drag; // deformable air drag
715 btScalar m_maxStress; // Maximum principle first Piola stress
716 };
717 /* SolverState */
718 struct SolverState
719 {
720 btScalar sdt; // dt*timescale
721 btScalar isdt; // 1/sdt
722 btScalar velmrg; // velocity margin
723 btScalar radmrg; // radial margin
724 btScalar updmrg; // Update margin
725 };
727 struct RayFromToCaster : btDbvt::ICollide
728 {
729 btVector3 m_rayFrom;
730 btVector3 m_rayTo;
731 btVector3 m_rayNormalizedDirection;
732 btScalar m_mint;
733 Face* m_face;
734 int m_tests;
735 RayFromToCaster(const btVector3& rayFrom, const btVector3& rayTo, btScalar mxt);
736 void Process(const btDbvtNode* leaf);
737
738 static /*inline*/ btScalar rayFromToTriangle(const btVector3& rayFrom,
739 const btVector3& rayTo,
740 const btVector3& rayNormalizedDirection,
741 const btVector3& a,
742 const btVector3& b,
743 const btVector3& c,
744 btScalar maxt = SIMD_INFINITY);
745 };
746
747 //
748 // Typedefs
749 //
750
751 typedef void (*psolver_t)(btSoftBody*, btScalar, btScalar);
752 typedef void (*vsolver_t)(btSoftBody*, btScalar);
753 typedef btAlignedObjectArray<Cluster*> tClusterArray;
754 typedef btAlignedObjectArray<Note> tNoteArray;
755 typedef btAlignedObjectArray<Node> tNodeArray;
756 typedef btAlignedObjectArray<btDbvtNode*> tLeafArray;
757 typedef btAlignedObjectArray<Link> tLinkArray;
758 typedef btAlignedObjectArray<Face> tFaceArray;
759 typedef btAlignedObjectArray<Tetra> tTetraArray;
760 typedef btAlignedObjectArray<Anchor> tAnchorArray;
761 typedef btAlignedObjectArray<RContact> tRContactArray;
762 typedef btAlignedObjectArray<SContact> tSContactArray;
763 typedef btAlignedObjectArray<Material*> tMaterialArray;
764 typedef btAlignedObjectArray<Joint*> tJointArray;
765 typedef btAlignedObjectArray<btSoftBody*> tSoftBodyArray;
766
767 //
768 // Fields
769 //
770
771 Config m_cfg; // Configuration
772 SolverState m_sst; // Solver state
773 Pose m_pose; // Pose
774 void* m_tag; // User data
775 btSoftBodyWorldInfo* m_worldInfo; // World info
776 tNoteArray m_notes; // Notes
777 tNodeArray m_nodes; // Nodes
778 tNodeArray m_renderNodes; // Nodes
779 tLinkArray m_links; // Links
780 tFaceArray m_faces; // Faces
781 tFaceArray m_renderFaces; // Faces
782 tTetraArray m_tetras; // Tetras
783 btAlignedObjectArray<TetraScratch> m_tetraScratches;
784 btAlignedObjectArray<TetraScratch> m_tetraScratchesTn;
785 tAnchorArray m_anchors; // Anchors
786 btAlignedObjectArray<DeformableNodeRigidAnchor> m_deformableAnchors;
787 tRContactArray m_rcontacts; // Rigid contacts
788 btAlignedObjectArray<DeformableNodeRigidContact> m_nodeRigidContacts;
789 btAlignedObjectArray<DeformableFaceNodeContact> m_faceNodeContacts;
790 btAlignedObjectArray<DeformableFaceRigidContact> m_faceRigidContacts;
791 tSContactArray m_scontacts; // Soft contacts
792 tJointArray m_joints; // Joints
793 tMaterialArray m_materials; // Materials
794 btScalar m_timeacc; // Time accumulator
795 btVector3 m_bounds[2]; // Spatial bounds
796 bool m_bUpdateRtCst; // Update runtime constants
797 btDbvt m_ndbvt; // Nodes tree
798 btDbvt m_fdbvt; // Faces tree
799 btDbvt m_cdbvt; // Clusters tree
800 tClusterArray m_clusters; // Clusters
801 btScalar m_dampingCoefficient; // Damping Coefficient
802 btScalar m_sleepingThreshold;
803 btScalar m_maxSpeedSquared;
804 bool m_useFaceContact;
805 btAlignedObjectArray<btVector3> m_quads; // quadrature points for collision detection
806
807 btAlignedObjectArray<btVector4> m_renderNodesInterpolationWeights;
808 btAlignedObjectArray<btAlignedObjectArray<const btSoftBody::Node*> > m_renderNodesParents;
809 bool m_useSelfCollision;
810
811 btAlignedObjectArray<bool> m_clusterConnectivity; //cluster connectivity, for self-collision
812
813 btTransform m_initialWorldTransform;
814
815 btVector3 m_windVelocity;
816
817 btScalar m_restLengthScale;
818
819 //
820 // Api
821 //
822
823 /* ctor */
824 btSoftBody(btSoftBodyWorldInfo* worldInfo, int node_count, const btVector3* x, const btScalar* m);
825
826 /* ctor */
827 btSoftBody(btSoftBodyWorldInfo* worldInfo);
828
829 void initDefaults();
830
831 /* dtor */
832 virtual ~btSoftBody();
833 /* Check for existing link */
834
835 btAlignedObjectArray<int> m_userIndexMapping;
836
837 btSoftBodyWorldInfo* getWorldInfo()
838 {
839 return m_worldInfo;
840 }
841
842 void setDampingCoefficient(btScalar damping_coeff)
843 {
844 m_dampingCoefficient = damping_coeff;
845 }
846
847 void setUseFaceContact(bool useFaceContact)
848 {
849 m_useFaceContact = false;
850 }
851
853 virtual void setCollisionShape(btCollisionShape* collisionShape)
854 {
855 }
856
857 bool checkLink(int node0,
858 int node1) const;
859 bool checkLink(const Node* node0,
860 const Node* node1) const;
861 /* Check for existring face */
862 bool checkFace(int node0,
863 int node1,
864 int node2) const;
865 /* Append material */
866 Material* appendMaterial();
867 /* Append note */
868 void appendNote(const char* text,
869 const btVector3& o,
870 const btVector4& c = btVector4(1, 0, 0, 0),
871 Node* n0 = 0,
872 Node* n1 = 0,
873 Node* n2 = 0,
874 Node* n3 = 0);
875 void appendNote(const char* text,
876 const btVector3& o,
877 Node* feature);
878 void appendNote(const char* text,
879 const btVector3& o,
880 Link* feature);
881 void appendNote(const char* text,
882 const btVector3& o,
883 Face* feature);
884 /* Append node */
885 void appendNode(const btVector3& x, btScalar m);
886 /* Append link */
887 void appendLink(int model = -1, Material* mat = 0);
888 void appendLink(int node0,
889 int node1,
890 Material* mat = 0,
891 bool bcheckexist = false);
892 void appendLink(Node* node0,
893 Node* node1,
894 Material* mat = 0,
895 bool bcheckexist = false);
896 /* Append face */
897 void appendFace(int model = -1, Material* mat = 0);
898 void appendFace(int node0,
899 int node1,
900 int node2,
901 Material* mat = 0);
902 void appendTetra(int model, Material* mat);
903 //
904 void appendTetra(int node0,
905 int node1,
906 int node2,
907 int node3,
908 Material* mat = 0);
909
910 /* Append anchor */
911 void appendDeformableAnchor(int node, btRigidBody* body);
912 void appendDeformableAnchor(int node, btMultiBodyLinkCollider* link);
913 void appendAnchor(int node,
914 btRigidBody* body, bool disableCollisionBetweenLinkedBodies = false, btScalar influence = 1);
915 void appendAnchor(int node, btRigidBody* body, const btVector3& localPivot, bool disableCollisionBetweenLinkedBodies = false, btScalar influence = 1);
916 /* Append linear joint */
917 void appendLinearJoint(const LJoint::Specs& specs, Cluster* body0, Body body1);
918 void appendLinearJoint(const LJoint::Specs& specs, Body body = Body());
919 void appendLinearJoint(const LJoint::Specs& specs, btSoftBody* body);
920 /* Append linear joint */
921 void appendAngularJoint(const AJoint::Specs& specs, Cluster* body0, Body body1);
922 void appendAngularJoint(const AJoint::Specs& specs, Body body = Body());
923 void appendAngularJoint(const AJoint::Specs& specs, btSoftBody* body);
924 /* Add force (or gravity) to the entire body */
925 void addForce(const btVector3& force);
926 /* Add force (or gravity) to a node of the body */
927 void addForce(const btVector3& force,
928 int node);
929 /* Add aero force to a node of the body */
930 void addAeroForceToNode(const btVector3& windVelocity, int nodeIndex);
931
932 /* Add aero force to a face of the body */
933 void addAeroForceToFace(const btVector3& windVelocity, int faceIndex);
934
935 /* Add velocity to the entire body */
936 void addVelocity(const btVector3& velocity);
937
938 /* Set velocity for the entire body */
939 void setVelocity(const btVector3& velocity);
940
941 /* Add velocity to a node of the body */
942 void addVelocity(const btVector3& velocity,
943 int node);
944 /* Set mass */
945 void setMass(int node,
946 btScalar mass);
947 /* Get mass */
948 btScalar getMass(int node) const;
949 /* Get total mass */
950 btScalar getTotalMass() const;
951 /* Set total mass (weighted by previous masses) */
952 void setTotalMass(btScalar mass,
953 bool fromfaces = false);
954 /* Set total density */
955 void setTotalDensity(btScalar density);
956 /* Set volume mass (using tetrahedrons) */
957 void setVolumeMass(btScalar mass);
958 /* Set volume density (using tetrahedrons) */
959 void setVolumeDensity(btScalar density);
960 /* Transform */
961 void transform(const btTransform& trs);
962 /* Translate */
963 void translate(const btVector3& trs);
964 /* Rotate */
965 void rotate(const btQuaternion& rot);
966 /* Scale */
967 void scale(const btVector3& scl);
968 /* Get link resting lengths scale */
969 btScalar getRestLengthScale();
970 /* Scale resting length of all springs */
971 void setRestLengthScale(btScalar restLength);
972 /* Set current state as pose */
973 void setPose(bool bvolume,
974 bool bframe);
975 /* Set current link lengths as resting lengths */
976 void resetLinkRestLengths();
977 /* Return the volume */
978 btScalar getVolume() const;
979 /* Cluster count */
980 btVector3 getCenterOfMass() const
981 {
982 btVector3 com(0, 0, 0);
983 for (int i = 0; i < m_nodes.size(); i++)
984 {
985 com += (m_nodes[i].m_x * this->getMass(i));
986 }
987 com /= this->getTotalMass();
988 return com;
989 }
990 int clusterCount() const;
991 /* Cluster center of mass */
992 static btVector3 clusterCom(const Cluster* cluster);
993 btVector3 clusterCom(int cluster) const;
994 /* Cluster velocity at rpos */
995 static btVector3 clusterVelocity(const Cluster* cluster, const btVector3& rpos);
996 /* Cluster impulse */
997 static void clusterVImpulse(Cluster* cluster, const btVector3& rpos, const btVector3& impulse);
998 static void clusterDImpulse(Cluster* cluster, const btVector3& rpos, const btVector3& impulse);
999 static void clusterImpulse(Cluster* cluster, const btVector3& rpos, const Impulse& impulse);
1000 static void clusterVAImpulse(Cluster* cluster, const btVector3& impulse);
1001 static void clusterDAImpulse(Cluster* cluster, const btVector3& impulse);
1002 static void clusterAImpulse(Cluster* cluster, const Impulse& impulse);
1003 static void clusterDCImpulse(Cluster* cluster, const btVector3& impulse);
1004 /* Generate bending constraints based on distance in the adjency graph */
1005 int generateBendingConstraints(int distance,
1006 Material* mat = 0);
1007 /* Randomize constraints to reduce solver bias */
1008 void randomizeConstraints();
1009 /* Release clusters */
1010 void releaseCluster(int index);
1011 void releaseClusters();
1012 /* Generate clusters (K-mean) */
1015 int generateClusters(int k, int maxiterations = 8192);
1016 /* Refine */
1017 void refine(ImplicitFn* ifn, btScalar accurary, bool cut);
1018 /* CutLink */
1019 bool cutLink(int node0, int node1, btScalar position);
1020 bool cutLink(const Node* node0, const Node* node1, btScalar position);
1021
1023 bool rayTest(const btVector3& rayFrom,
1024 const btVector3& rayTo,
1025 sRayCast& results);
1026 /* Solver presets */
1027 void setSolver(eSolverPresets::_ preset);
1028 /* predictMotion */
1029 void predictMotion(btScalar dt);
1030 /* solveConstraints */
1031 void solveConstraints();
1032 /* staticSolve */
1033 void staticSolve(int iterations);
1034 /* solveCommonConstraints */
1035 static void solveCommonConstraints(btSoftBody** bodies, int count, int iterations);
1036 /* solveClusters */
1037 static void solveClusters(const btAlignedObjectArray<btSoftBody*>& bodies);
1038 /* integrateMotion */
1039 void integrateMotion();
1040 /* defaultCollisionHandlers */
1041 void defaultCollisionHandler(const btCollisionObjectWrapper* pcoWrap);
1042 void defaultCollisionHandler(btSoftBody* psb);
1043 void setSelfCollision(bool useSelfCollision);
1044 bool useSelfCollision();
1045 void updateDeactivation(btScalar timeStep);
1046 void setZeroVelocity();
1047 bool wantsSleeping();
1048
1049 //
1050 // Functionality to deal with new accelerated solvers.
1051 //
1052
1056 void setWindVelocity(const btVector3& velocity);
1057
1061 const btVector3& getWindVelocity();
1062
1063 //
1064 // Set the solver that handles this soft body
1065 // Should not be allowed to get out of sync with reality
1066 // Currently called internally on addition to the world
1067 void setSoftBodySolver(btSoftBodySolver* softBodySolver)
1068 {
1069 m_softBodySolver = softBodySolver;
1070 }
1071
1072 //
1073 // Return the solver that handles this soft body
1074 //
1075 btSoftBodySolver* getSoftBodySolver()
1076 {
1077 return m_softBodySolver;
1078 }
1079
1080 //
1081 // Return the solver that handles this soft body
1082 //
1083 btSoftBodySolver* getSoftBodySolver() const
1084 {
1085 return m_softBodySolver;
1086 }
1087
1088 //
1089 // Cast
1090 //
1091
1092 static const btSoftBody* upcast(const btCollisionObject* colObj)
1093 {
1094 if (colObj->getInternalType() == CO_SOFT_BODY)
1095 return (const btSoftBody*)colObj;
1096 return 0;
1097 }
1098 static btSoftBody* upcast(btCollisionObject* colObj)
1099 {
1100 if (colObj->getInternalType() == CO_SOFT_BODY)
1101 return (btSoftBody*)colObj;
1102 return 0;
1103 }
1104
1105 //
1106 // ::btCollisionObject
1107 //
1108
1109 virtual void getAabb(btVector3& aabbMin, btVector3& aabbMax) const
1110 {
1111 aabbMin = m_bounds[0];
1112 aabbMax = m_bounds[1];
1113 }
1114 //
1115 // Private
1116 //
1117 void pointersToIndices();
1118 void indicesToPointers(const int* map = 0);
1119
1120 int rayTest(const btVector3& rayFrom, const btVector3& rayTo,
1121 btScalar& mint, eFeature::_& feature, int& index, bool bcountonly) const;
1122 void initializeFaceTree();
1123 btVector3 evaluateCom() const;
1124 bool checkDeformableContact(const btCollisionObjectWrapper* colObjWrap, const btVector3& x, btScalar margin, btSoftBody::sCti& cti, bool predict = false) const;
1125 bool checkDeformableFaceContact(const btCollisionObjectWrapper* colObjWrap, Face& f, btVector3& contact_point, btVector3& bary, btScalar margin, btSoftBody::sCti& cti, bool predict = false) const;
1126 bool checkContact(const btCollisionObjectWrapper* colObjWrap, const btVector3& x, btScalar margin, btSoftBody::sCti& cti) const;
1127 void updateNormals();
1128 void updateBounds();
1129 void updatePose();
1130 void updateConstants();
1131 void updateLinkConstants();
1132 void updateArea(bool averageArea = true);
1133 void initializeClusters();
1134 void updateClusters();
1135 void cleanupClusters();
1136 void prepareClusters(int iterations);
1137 void solveClusters(btScalar sor);
1138 void applyClusters(bool drift);
1139 void dampClusters();
1140 void setSpringStiffness(btScalar k);
1141 void initializeDmInverse();
1142 void updateDeformation();
1143 void advanceDeformation();
1144 void applyForces();
1145 void setMaxStress(btScalar maxStress);
1146 void interpolateRenderMesh();
1147 void setCollisionQuadrature(int N);
1148 static void PSolve_Anchors(btSoftBody* psb, btScalar kst, btScalar ti);
1149 static void PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti);
1150 static void PSolve_SContacts(btSoftBody* psb, btScalar, btScalar ti);
1151 static void PSolve_Links(btSoftBody* psb, btScalar kst, btScalar ti);
1152 static void VSolve_Links(btSoftBody* psb, btScalar kst);
1153 static psolver_t getSolver(ePSolver::_ solver);
1154 static vsolver_t getSolver(eVSolver::_ solver);
1155
1156 virtual int calculateSerializeBufferSize() const;
1157
1159 virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
1160 };
1161
1162 #endif //_BT_SOFT_BODY_H
btSoftBody::Config::kAHR
btScalar kAHR
Definition: btSoftBody.h:697
btSoftBody::ImplicitFn
Definition: btSoftBody.h:205
btSoftBody::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btSoftBody.cpp:3850
btSoftBody::RContact::m_c0
btMatrix3x3 m_c0
Definition: btSoftBody.h:322
btSoftBody::m_restLengthScale
btScalar m_restLengthScale
Definition: btSoftBody.h:817
btSoftBody::Body::applyVAImpulse
void applyVAImpulse(const btVector3 &impulse) const
Definition: btSoftBody.h:573
btSoftBody::DeformableRigidContact::jacobianData_t2
btMultiBodyJacobianData jacobianData_t2
Definition: btSoftBody.h:349
btSoftBody::updateDeactivation
void updateDeactivation(btScalar timeStep)
Definition: btSoftBody.cpp:4237
btSoftBody::AJoint::Solve
void Solve(btScalar dt, btScalar sor)
Definition: btSoftBody.cpp:3199
btSoftBody::cleanupClusters
void cleanupClusters()
Definition: btSoftBody.cpp:2964
btSoftBody::addVelocity
void addVelocity(const btVector3 &velocity)
Definition: btSoftBody.cpp:760
btSoftBody::Joint::Specs::split
btScalar split
Definition: btSoftBody.h:611
btSoftBody::Cluster
Definition: btSoftBody.h:434
btSoftBody::LJoint::Type
eType::_ Type() const
Definition: btSoftBody.h:640
btSoftBody::Body::xform
const btTransform & xform() const
Definition: btSoftBody.h:521
btSoftBody::Joint::m_refs
btVector3 m_refs[2]
Definition: btSoftBody.h:614
btSoftBody::Joint::~Joint
virtual ~Joint()
Definition: btSoftBody.h:622
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:50
btSoftBody::Joint::m_split
btScalar m_split
Definition: btSoftBody.h:617
btSoftBody::checkLink
bool checkLink(int node0, int node1) const
Definition: btSoftBody.cpp:140
btSoftBody::Joint::Terminate
virtual void Terminate(btScalar dt)=0
btSoftBody::fMaterial::Default
@ Default
Enable debug draw.
Definition: btSoftBody.h:185
btSoftBody::tAnchorArray
btAlignedObjectArray< Anchor > tAnchorArray
Definition: btSoftBody.h:760
btSoftBody::Anchor::m_c2
btScalar m_c2
Definition: btSoftBody.h:408
btSoftBody::PSolve_Links
static void PSolve_Links(btSoftBody *psb, btScalar kst, btScalar ti)
Definition: btSoftBody.cpp:3532
btSoftBody::Config::m_vsequence
tVSolverArray m_vsequence
Definition: btSoftBody.h:711
btSoftBody::solveClusters
static void solveClusters(const btAlignedObjectArray< btSoftBody * > &bodies)
Definition: btSoftBody.cpp:2084
btSoftBody::Body::angularVelocity
btVector3 angularVelocity(const btVector3 &rpos) const
Definition: btSoftBody.h:534
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:60
btSoftBody::Config::diterations
int diterations
Definition: btSoftBody.h:708
btSoftBody::fCollision::VF_DD
@ VF_DD
Cluster soft body self collision.
Definition: btSoftBody.h:171
btSoftBody::setDampingCoefficient
void setDampingCoefficient(btScalar damping_coeff)
Definition: btSoftBody.h:842
btSoftBody::vsolver_t
void(* vsolver_t)(btSoftBody *, btScalar)
Definition: btSoftBody.h:752
btSoftBody::AJoint
Definition: btSoftBody.h:644
btSoftBody::dampClusters
void dampClusters()
Definition: btSoftBody.cpp:3047
btSoftBody::appendLink
void appendLink(int model=-1, Material *mat=0)
Definition: btSoftBody.cpp:276
btSoftBody::Anchor::m_node
Node * m_node
Definition: btSoftBody.h:402
btSoftBody::m_links
tLinkArray m_links
Definition: btSoftBody.h:779
btSoftBody::SolverState::isdt
btScalar isdt
Definition: btSoftBody.h:721
btSoftBody::upcast
static btSoftBody * upcast(btCollisionObject *colObj)
Definition: btSoftBody.h:1098
btSoftBody::AJoint::m_icontrol
IControl * m_icontrol
Definition: btSoftBody.h:663
btSoftBody::DeformableFaceNodeContact::m_node
Node * m_node
Definition: btSoftBody.h:377
btSoftBody::AJoint::Terminate
void Terminate(btScalar dt)
Definition: btSoftBody.cpp:3214
btSoftBody::m_clusterConnectivity
btAlignedObjectArray< bool > m_clusterConnectivity
Definition: btSoftBody.h:811
btSoftBody::tLinkArray
btAlignedObjectArray< Link > tLinkArray
Definition: btSoftBody.h:757
btSoftBody::indicesToPointers
void indicesToPointers(const int *map=0)
Definition: btSoftBody.cpp:2224
btSoftBody::tClusterArray
btAlignedObjectArray< Cluster * > tClusterArray
Definition: btSoftBody.h:753
btSoftBody::SContact::m_normal
btVector3 m_normal
Definition: btSoftBody.h:394
btSoftBody::ePSolver::_
_
Definition: btSoftBody.h:114
btSoftBody::RayFromToCaster::m_tests
int m_tests
Definition: btSoftBody.h:734
btSoftBody::wantsSleeping
bool wantsSleeping()
Definition: btSoftBody.cpp:4262
btSoftBody::eAeroModel::F_OneSided
@ F_OneSided
Face normals are flipped to match velocity and lift and drag forces are applied.
Definition: btSoftBody.h:95
btSoftBody::m_tetras
tTetraArray m_tetras
Definition: btSoftBody.h:782
btSoftBody::ePSolver
ePSolver : positions solvers
Definition: btSoftBody.h:112
btSoftBody::Impulse::m_drift
btVector3 m_drift
Definition: btSoftBody.h:468
btSoftBody::updateConstants
void updateConstants()
Definition: btSoftBody.cpp:2773
btSoftBody::Config::kSRHR_CL
btScalar kSRHR_CL
Definition: btSoftBody.h:698
btSoftBody::Node::m_battach
int m_battach
Definition: btSoftBody.h:267
btSoftBody::Body::m_collisionObject
const btCollisionObject * m_collisionObject
Definition: btSoftBody.h:492
btSoftBody::Cluster::m_imass
btScalar m_imass
Definition: btSoftBody.h:440
btSoftBody::tPSolverArray
btAlignedObjectArray< ePSolver::_ > tPSolverArray
Definition: btSoftBody.h:150
btQuaternion
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
Definition: btQuaternion.h:50
btSoftBody::RContact::m_c1
btVector3 m_c1
Definition: btSoftBody.h:323
btSoftBody::fCollision::VF_SS
@ VF_SS
Rigid versus soft mask.
Definition: btSoftBody.h:168
btSoftBody::appendFace
void appendFace(int model=-1, Material *mat=0)
Definition: btSoftBody.cpp:316
btSoftBody::Cluster::m_com
btVector3 m_com
Definition: btSoftBody.h:443
btSoftBody::m_cfg
Config m_cfg
Definition: btSoftBody.h:771
btSoftBody::Joint::Specs
Definition: btSoftBody.h:607
btSoftBody::psolver_t
void(* psolver_t)(btSoftBody *, btScalar, btScalar)
Definition: btSoftBody.h:751
btSoftBody::Impulse
Definition: btSoftBody.h:466
btSoftBody::Material::m_kVST
btScalar m_kVST
Definition: btSoftBody.h:245
btSoftBody::m_quads
btAlignedObjectArray< btVector3 > m_quads
Definition: btSoftBody.h:805
btSoftBody::m_windVelocity
btVector3 m_windVelocity
Definition: btSoftBody.h:815
btSoftBody::Face::m_ra
btScalar m_ra
Definition: btSoftBody.h:289
btSoftBody::Body::Body
Body(Cluster *p)
Definition: btSoftBody.h:495
btSoftBody::Tetra::m_c0
btVector3 m_c0[4]
Definition: btSoftBody.h:300
btRigidBody::getAngularVelocity
const btVector3 & getAngularVelocity() const
Definition: btRigidBody.h:402
btSoftBody::m_faceNodeContacts
btAlignedObjectArray< DeformableFaceNodeContact > m_faceNodeContacts
Definition: btSoftBody.h:789
btSoftBody::AJoint::Prepare
void Prepare(btScalar dt, int iterations)
Definition: btSoftBody.cpp:3179
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btSoftBody::SContact::m_margin
btScalar m_margin
Definition: btSoftBody.h:395
btSoftBody::refine
void refine(ImplicitFn *ifn, btScalar accurary, bool cut)
Definition: btSoftBody.cpp:1497
btSoftBody::Link::BT_DECLARE_ALIGNED_ALLOCATOR
BT_DECLARE_ALIGNED_ALLOCATOR()
btSoftBody::prepareClusters
void prepareClusters(int iterations)
Definition: btSoftBody.cpp:2978
btSoftBody::eSolverPresets::Positions
@ Positions
Definition: btSoftBody.h:128
btSoftBody::Note::m_coords
btScalar m_coords[4]
Definition: btSoftBody.h:417
btSoftBody::m_sleepingThreshold
btScalar m_sleepingThreshold
Definition: btSoftBody.h:802
btSoftBody::defaultCollisionHandler
void defaultCollisionHandler(const btCollisionObjectWrapper *pcoWrap)
Definition: btSoftBody.cpp:3613
btSoftBody::initDefaults
void initDefaults()
Definition: btSoftBody.cpp:64
btSoftBody::DeformableFaceNodeContact::m_c0
btScalar m_c0
Definition: btSoftBody.h:385
btSoftBody::Cluster::m_av
btVector3 m_av
Definition: btSoftBody.h:449
btSoftBody::CJoint
Definition: btSoftBody.h:671
btSoftBody::Pose::m_com
btVector3 m_com
Definition: btSoftBody.h:427
btSoftBody::Element
Definition: btSoftBody.h:236
btSoftBody::Body::m_soft
Cluster * m_soft
Definition: btSoftBody.h:490
btSoftBody::Config::citerations
int citerations
Definition: btSoftBody.h:709
btSoftBody::Joint::Joint
Joint()
Definition: btSoftBody.h:623
btCollisionObjectWrapper
Definition: btCollisionObjectWrapper.h:18
btSoftBody::Node::m_n
btVector3 m_n
Definition: btSoftBody.h:263
btDispatcher
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
Definition: btDispatcher.h:77
btSoftBody::ePSolver::Linear
@ Linear
Definition: btSoftBody.h:115
btSoftBody::Pose::m_bframe
bool m_bframe
Definition: btSoftBody.h:423
btSoftBody::Body
Definition: btSoftBody.h:489
btSoftBody::pointersToIndices
void pointersToIndices()
Definition: btSoftBody.cpp:2181
btSoftBody::DeformableNodeRigidContact
Definition: btSoftBody.h:355
btSoftBody::Cluster::m_clusterIndex
int m_clusterIndex
Definition: btSoftBody.h:459
btSoftBody::m_timeacc
btScalar m_timeacc
Definition: btSoftBody.h:794
btSoftBody::checkDeformableContact
bool checkDeformableContact(const btCollisionObjectWrapper *colObjWrap, const btVector3 &x, btScalar margin, btSoftBody::sCti &cti, bool predict=false) const
Definition: btSoftBody.cpp:2396
btSoftBody::Config::piterations
int piterations
Definition: btSoftBody.h:707
btSoftBody::Tetra::m_leaf
btDbvtNode * m_leaf
Definition: btSoftBody.h:299
btSoftBody::fMaterial::_
_
Definition: btSoftBody.h:182
btSoftBody::fCollision::END
@ END
Definition: btSoftBody.h:174
btSoftBody::Joint::Type
virtual eType::_ Type() const =0
btSoftBody::fCollision::SDF_RD
@ SDF_RD
Cluster vs convex rigid vs soft.
Definition: btSoftBody.h:164
btSoftBody::AJoint::Specs::Specs
Specs()
Definition: btSoftBody.h:658
btSoftBody::ePSolver::SContacts
@ SContacts
Rigid contacts solver.
Definition: btSoftBody.h:118
btSoftBody::getCenterOfMass
btVector3 getCenterOfMass() const
Definition: btSoftBody.h:980
btSoftBody::Note::m_offset
btVector3 m_offset
Definition: btSoftBody.h:414
btSoftBody::m_anchors
tAnchorArray m_anchors
Definition: btSoftBody.h:785
btSoftBody::appendNote
void appendNote(const char *text, const btVector3 &o, const btVector4 &c=btVector4(1, 0, 0, 0), Node *n0=0, Node *n1=0, Node *n2=0, Node *n3=0)
Definition: btSoftBody.cpp:198
btSoftBody::Cluster::m_locii
btMatrix3x3 m_locii
Definition: btSoftBody.h:441
btSoftBodyWorldInfo::m_dispatcher
btDispatcher * m_dispatcher
Definition: btSoftBody.h:53
btSoftBody::DeformableRigidContact::m_c3
btScalar m_c3
Definition: btSoftBody.h:343
btSoftBody::updatePose
void updatePose()
Definition: btSoftBody.cpp:2659
btSoftBody::Config::kDP
btScalar kDP
Definition: btSoftBody.h:687
btConcaveShape.h
btSoftBody::CJoint::m_friction
btScalar m_friction
Definition: btSoftBody.h:676
btSoftBody::Face::m_normal
btVector3 m_normal
Definition: btSoftBody.h:288
btSoftBody::eFeature::Tetra
@ Tetra
Definition: btSoftBody.h:144
btSoftBodyWorldInfo::water_normal
btVector3 water_normal
Definition: btSoftBody.h:51
btSoftBody::getWindVelocity
const btVector3 & getWindVelocity()
Return the wind velocity for interaction with the air.
Definition: btSoftBody.cpp:3845
btSoftBody::LJoint::Terminate
void Terminate(btScalar dt)
Definition: btSoftBody.cpp:3169
btSoftBody::Cluster::m_framexform
btTransform m_framexform
Definition: btSoftBody.h:438
btSoftBody::Joint::Specs::Specs
Specs()
Definition: btSoftBody.h:608
btSoftBody::m_pose
Pose m_pose
Definition: btSoftBody.h:773
btSparseSdf< 3 >
btSoftBody::RayFromToCaster::m_rayTo
btVector3 m_rayTo
Definition: btSoftBody.h:730
btSoftBody::upcast
static const btSoftBody * upcast(const btCollisionObject *colObj)
Definition: btSoftBody.h:1092
btSoftBody::fCollision::SDF_RS
@ SDF_RS
Rigid versus soft mask.
Definition: btSoftBody.h:162
btSoftBody::m_renderNodes
tNodeArray m_renderNodes
Definition: btSoftBody.h:778
btSoftBody::Joint::eType::_
_
Definition: btSoftBody.h:600
btSoftBody::TetraScratch::m_J
btScalar m_J
Definition: btSoftBody.h:313
btSoftBody::appendAnchor
void appendAnchor(int node, btRigidBody *body, bool disableCollisionBetweenLinkedBodies=false, btScalar influence=1)
Definition: btSoftBody.cpp:388
btSoftBody::staticSolve
void staticSolve(int iterations)
Definition: btSoftBody.cpp:2066
btSoftBody::eSolverPresets::Velocities
@ Velocities
Definition: btSoftBody.h:129
btSoftBody::Body::applyDAImpulse
void applyDAImpulse(const btVector3 &impulse) const
Definition: btSoftBody.h:578
btSoftBody::appendMaterial
Material * appendMaterial()
Definition: btSoftBody.cpp:186
btSoftBody::AJoint::Specs::icontrol
IControl * icontrol
Definition: btSoftBody.h:660
btSoftBody::Pose::m_aqq
btMatrix3x3 m_aqq
Definition: btSoftBody.h:430
btRigidBody.h
btSoftBody::AJoint::m_axis
btVector3 m_axis[2]
Definition: btSoftBody.h:662
btCross
btVector3 btCross(const btVector3 &v1, const btVector3 &v2)
Return the cross product of two vectors.
Definition: btVector3.h:918
btSoftBody::resetLinkRestLengths
void resetLinkRestLengths()
Definition: btSoftBody.cpp:1031
btSoftBody::m_faces
tFaceArray m_faces
Definition: btSoftBody.h:780
btSoftBody::Config::maxvolume
btScalar maxvolume
Definition: btSoftBody.h:704
btSoftBody::clusterCom
static btVector3 clusterCom(const Cluster *cluster)
Definition: btSoftBody.cpp:1067
btRigidBody::applyTorqueImpulse
void applyTorqueImpulse(const btVector3 &torque)
Definition: btRigidBody.h:321
btSoftBody::integrateMotion
void integrateMotion()
Definition: btSoftBody.cpp:2113
btSoftBody::Anchor
Definition: btSoftBody.h:401
btSoftBody::tNoteArray
btAlignedObjectArray< Note > tNoteArray
Definition: btSoftBody.h:754
btSoftBody::Material::m_kAST
btScalar m_kAST
Definition: btSoftBody.h:244
btSoftBody::Pose::m_rot
btMatrix3x3 m_rot
Definition: btSoftBody.h:428
btSoftBody::DeformableRigidContact::m_c4
btScalar m_c4
Definition: btSoftBody.h:344
btSoftBody::setVolumeDensity
void setVolumeDensity(btScalar density)
Definition: btSoftBody.cpp:885
btSoftBody::setSelfCollision
void setSelfCollision(bool useSelfCollision)
Definition: btSoftBody.cpp:3602
btSoftBody::setWindVelocity
void setWindVelocity(const btVector3 &velocity)
Set a wind velocity for interaction with the air.
Definition: btSoftBody.cpp:3840
btSoftBody::Pose::m_bvolume
bool m_bvolume
Definition: btSoftBody.h:422
btSoftBody::tTetraArray
btAlignedObjectArray< Tetra > tTetraArray
Definition: btSoftBody.h:759
btSoftBody::clusterVelocity
static btVector3 clusterVelocity(const Cluster *cluster, const btVector3 &rpos)
Definition: btSoftBody.cpp:1084
btSoftBody::Node::m_vsplit
btVector3 m_vsplit
Definition: btSoftBody.h:260
btSoftBody::Body::velocity
btVector3 velocity(const btVector3 &rpos) const
Definition: btSoftBody.h:546
btSoftBody::Anchor::m_c1
btVector3 m_c1
Definition: btSoftBody.h:407
btSoftBody::addAeroForceToFace
void addAeroForceToFace(const btVector3 &windVelocity, int faceIndex)
Definition: btSoftBody.cpp:664
btSoftBody::Body::Body
Body(const btCollisionObject *colObj)
Definition: btSoftBody.h:496
btSoftBody::Joint::m_erp
btScalar m_erp
Definition: btSoftBody.h:616
btSoftBody::Node::m_leaf
btDbvtNode * m_leaf
Definition: btSoftBody.h:266
btSoftBody::Anchor::m_c0
btMatrix3x3 m_c0
Definition: btSoftBody.h:406
btSoftBody::Cluster::m_ndimpulses
int m_ndimpulses
Definition: btSoftBody.h:447
btCollisionObject::CO_SOFT_BODY
@ CO_SOFT_BODY
Definition: btCollisionObject.h:150
btSoftBody::Link::m_c3
btVector3 m_c3
Definition: btSoftBody.h:274
btSoftBody::tSContactArray
btAlignedObjectArray< SContact > tSContactArray
Definition: btSoftBody.h:762
btSoftBody::eAeroModel::_
_
Definition: btSoftBody.h:88
btSoftBody::Body::applyDImpulse
void applyDImpulse(const btVector3 &impulse, const btVector3 &rpos) const
Definition: btSoftBody.h:555
btSoftBody::fMaterial::DebugDraw
@ DebugDraw
Definition: btSoftBody.h:183
btSoftBody::Cluster::m_framerefs
tVector3Array m_framerefs
Definition: btSoftBody.h:437
btSoftBody::SolverState
Definition: btSoftBody.h:719
btSoftBody::eVSolver::END
@ END
Linear solver.
Definition: btSoftBody.h:106
btSoftBody::Config
Definition: btSoftBody.h:684
btSoftBody::Config::kDF
btScalar kDF
Definition: btSoftBody.h:692
btSoftBody::Note
Definition: btSoftBody.h:412
btSoftBody::m_notes
tNoteArray m_notes
Definition: btSoftBody.h:776
btSoftBody::m_cdbvt
btDbvt m_cdbvt
Definition: btSoftBody.h:799
btSoftBody::checkFace
bool checkFace(int node0, int node1, int node2) const
Definition: btSoftBody.cpp:162
btSoftBody::Node
Definition: btSoftBody.h:256
btSoftBodyWorldInfo
Definition: btSoftBody.h:46
btSoftBody::sCti
Definition: btSoftBody.h:219
btSoftBody::Body::invWorldInertia
const btMatrix3x3 & invWorldInertia() const
Definition: btSoftBody.h:508
btSoftBody::randomizeConstraints
void randomizeConstraints()
Definition: btSoftBody.cpp:1270
btSoftBody::Body::applyImpulse
void applyImpulse(const Impulse &impulse, const btVector3 &rpos) const
Definition: btSoftBody.h:560
btSoftBody::eFeature::_
_
Definition: btSoftBody.h:139
btSoftBody::Tetra::m_F
btMatrix3x3 m_F
Definition: btSoftBody.h:304
btSoftBody::m_materials
tMaterialArray m_materials
Definition: btSoftBody.h:793
btSoftBody::LJoint::Solve
void Solve(btScalar dt, btScalar sor)
Definition: btSoftBody.cpp:3156
btSoftBody::RContact::jacobianData_t1
btMultiBodyJacobianData jacobianData_t1
Definition: btSoftBody.h:330
btSoftBody::generateClusters
int generateClusters(int k, int maxiterations=8192)
generateClusters with k=0 will create a convex cluster for each tetrahedron or triangle otherwise an ...
Definition: btSoftBody.cpp:1304
btSoftBody::eAeroModel::F_TwoSidedLiftDrag
@ F_TwoSidedLiftDrag
Face normals are flipped to match velocity.
Definition: btSoftBody.h:94
btSoftBody::setUseFaceContact
void setUseFaceContact(bool useFaceContact)
Definition: btSoftBody.h:847
btMultiBodyJacobianData
Definition: btMultiBodyConstraint.h:29
btSoftBody::Cluster::m_ldamping
btScalar m_ldamping
Definition: btSoftBody.h:452
btSoftBody::m_tetraScratches
btAlignedObjectArray< TetraScratch > m_tetraScratches
Definition: btSoftBody.h:783
btSoftBody::Config::kMT
btScalar kMT
Definition: btSoftBody.h:693
btSoftBody::m_renderNodesInterpolationWeights
btAlignedObjectArray< btVector4 > m_renderNodesInterpolationWeights
Definition: btSoftBody.h:807
btVector4
Definition: btVector3.h:1074
btSoftBody::PSolve_RContacts
static void PSolve_RContacts(btSoftBody *psb, btScalar kst, btScalar ti)
Definition: btSoftBody.cpp:3422
btSoftBody::AJoint::IControl::Default
static IControl * Default()
Definition: btSoftBody.h:650
btSoftBody::LJoint::Specs
Definition: btSoftBody.h:633
btSoftBody::Note::m_rank
int m_rank
Definition: btSoftBody.h:415
btSoftBody::DeformableFaceRigidContact::m_bary
btVector3 m_bary
Definition: btSoftBody.h:371
btSoftBody::Tetra
Definition: btSoftBody.h:296
btSoftBody::DeformableFaceNodeContact::m_normal
btVector3 m_normal
Definition: btSoftBody.h:381
btSoftBody::sRayCast
Definition: btSoftBody.h:196
btSoftBody::useSelfCollision
bool useSelfCollision()
Definition: btSoftBody.cpp:3607
btSoftBody::AJoint::IControl::Prepare
virtual void Prepare(AJoint *)
Definition: btSoftBody.h:648
btSoftBody::getVolume
btScalar getVolume() const
Definition: btSoftBody.cpp:1042
btSoftBody::eAeroModel::END
@ END
Face normals are taken as it is.
Definition: btSoftBody.h:96
btSoftBody::m_renderNodesParents
btAlignedObjectArray< btAlignedObjectArray< const btSoftBody::Node * > > m_renderNodesParents
Definition: btSoftBody.h:808
btSoftBody::m_sst
SolverState m_sst
Definition: btSoftBody.h:772
btCollisionObject::getWorldTransform
btTransform & getWorldTransform()
Definition: btCollisionObject.h:367
btSoftBody::Joint::m_massmatrix
btMatrix3x3 m_massmatrix
Definition: btSoftBody.h:620
btSoftBody::DeformableNodeRigidAnchor
Definition: btSoftBody.h:361
btSoftBody::AJoint::Specs
Definition: btSoftBody.h:657
btSoftBody::Node::m_q
btVector3 m_q
Definition: btSoftBody.h:258
btSoftBody::m_scontacts
tSContactArray m_scontacts
Definition: btSoftBody.h:791
btSoftBody::tRContactArray
btAlignedObjectArray< RContact > tRContactArray
Definition: btSoftBody.h:761
btSoftBody::DeformableFaceRigidContact::m_weights
btVector3 m_weights
Definition: btSoftBody.h:372
btSoftBody::m_userIndexMapping
btAlignedObjectArray< int > m_userIndexMapping
Definition: btSoftBody.h:835
btSoftBody::RContact::m_node
Node * m_node
Definition: btSoftBody.h:321
btSoftBody::Cluster::m_nodes
btAlignedObjectArray< Node * > m_nodes
Definition: btSoftBody.h:436
btSoftBody::DeformableFaceNodeContact::m_imf
btScalar m_imf
Definition: btSoftBody.h:384
btVector3.h
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition: btCollisionShape.h:28
btSoftBody::Config::kVC
btScalar kVC
Definition: btSoftBody.h:691
btSoftBody::AJoint::Specs::axis
btVector3 axis
Definition: btSoftBody.h:659
btSoftBody::m_faceRigidContacts
btAlignedObjectArray< DeformableFaceRigidContact > m_faceRigidContacts
Definition: btSoftBody.h:790
btSoftBody::sRayCast::fraction
btScalar fraction
feature index
Definition: btSoftBody.h:200
btSoftBody::sCti::m_colObj
const btCollisionObject * m_colObj
Definition: btSoftBody.h:220
btSoftBody::Tetra::m_element_measure
btScalar m_element_measure
Definition: btSoftBody.h:305
btSoftBody::m_worldInfo
btSoftBodyWorldInfo * m_worldInfo
Definition: btSoftBody.h:775
btSoftBody::eAeroModel::V_Point
@ V_Point
Definition: btSoftBody.h:89
btSoftBody::serialize
virtual const char * serialize(void *dataBuffer, class btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btSoftBody.cpp:3857
btSoftBody::Anchor::m_body
btRigidBody * m_body
Definition: btSoftBody.h:404
btSoftBody::Cluster::m_invwi
btMatrix3x3 m_invwi
Definition: btSoftBody.h:442
btSoftBody::Node::m_x
btVector3 m_x
Definition: btSoftBody.h:257
btSoftBody::RayFromToCaster::Process
void Process(const btDbvtNode *leaf)
Definition: btSoftBody.cpp:2131
btSoftBody::Config::kSKHR_CL
btScalar kSKHR_CL
Definition: btSoftBody.h:699
btSoftBody::fCollision::CL_SS
@ CL_SS
Vertex vs face soft vs soft handling.
Definition: btSoftBody.h:169
btSoftBody::releaseClusters
void releaseClusters()
Definition: btSoftBody.cpp:1298
btSoftBody::Joint::eType::Linear
@ Linear
Definition: btSoftBody.h:601
btSoftBody::Body::angularVelocity
btVector3 angularVelocity() const
Definition: btSoftBody.h:540
btSoftBody::Link
Definition: btSoftBody.h:273
btSoftBody::AJoint::IControl::Speed
virtual btScalar Speed(AJoint *, btScalar current)
Definition: btSoftBody.h:649
btSoftBody::RayFromToCaster::RayFromToCaster
RayFromToCaster(const btVector3 &rayFrom, const btVector3 &rayTo, btScalar mxt)
Definition: btSoftBody.cpp:2120
btSoftBody::DeformableRigidContact::jacobianData_normal
btMultiBodyJacobianData jacobianData_normal
Definition: btSoftBody.h:347
btSoftBody::sMedium::m_density
btScalar m_density
Definition: btSoftBody.h:231
btSoftBody::m_bounds
btVector3 m_bounds[2]
Definition: btSoftBody.h:795
btDbvt
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...
Definition: btDbvt.h:229
btSoftBody::SContact::m_cfm
btScalar m_cfm[2]
Definition: btSoftBody.h:397
btSoftBody::tVector3Array
btAlignedObjectArray< btVector3 > tVector3Array
Definition: btSoftBody.h:215
btSoftBody::setZeroVelocity
void setZeroVelocity()
Definition: btSoftBody.cpp:4254
btSoftBody::RContact
Definition: btSoftBody.h:319
btSoftBodyWorldInfo::m_gravity
btVector3 m_gravity
Definition: btSoftBody.h:54
btSoftBody::RContact::jacobianData_t2
btMultiBodyJacobianData jacobianData_t2
Definition: btSoftBody.h:331
btSoftBody::fMaterial
fMaterial
Definition: btSoftBody.h:180
btSoftBody::m_initialWorldTransform
btTransform m_initialWorldTransform
Definition: btSoftBody.h:813
btSoftBody::Config::kDG
btScalar kDG
Definition: btSoftBody.h:688
btCollisionObject::activate
void activate(bool forceActivation=false) const
Definition: btCollisionObject.cpp:72
btSoftBody::CJoint::m_rpos
btVector3 m_rpos[2]
Definition: btSoftBody.h:674
btSoftBody::PSolve_SContacts
static void PSolve_SContacts(btSoftBody *psb, btScalar, btScalar ti)
Definition: btSoftBody.cpp:3497
btSoftBody::CJoint::Prepare
void Prepare(btScalar dt, int iterations)
Definition: btSoftBody.cpp:3224
btSoftBody::transform
void transform(const btTransform &trs)
Definition: btSoftBody.cpp:900
btSoftBody::getWorldInfo
btSoftBodyWorldInfo * getWorldInfo()
Definition: btSoftBody.h:837
btSoftBody::m_ndbvt
btDbvt m_ndbvt
Definition: btSoftBody.h:797
btSoftBody::SContact::m_face
Face * m_face
Definition: btSoftBody.h:392
btSoftBody::fCollision
fCollision
Definition: btSoftBody.h:158
btSoftBody::Face
Definition: btSoftBody.h:286
btSoftBody::RContact::m_c4
btScalar m_c4
Definition: btSoftBody.h:326
btSoftBody::eVSolver::_
_
Definition: btSoftBody.h:104
btMultiBodyLinkCollider.h
btSoftBody::m_tetraScratchesTn
btAlignedObjectArray< TetraScratch > m_tetraScratchesTn
Definition: btSoftBody.h:784
btSoftBody::updateDeformation
void updateDeformation()
Definition: btSoftBody.cpp:3098
btSoftBody::DeformableFaceRigidContact::m_contactPoint
btVector3 m_contactPoint
Definition: btSoftBody.h:370
btSoftBody::Anchor::m_influence
btScalar m_influence
Definition: btSoftBody.h:405
btSoftBody::sCti::m_bary
btVector3 m_bary
Definition: btSoftBody.h:223
btSoftBody::SolverState::updmrg
btScalar updmrg
Definition: btSoftBody.h:724
btSoftBody::DeformableNodeRigidContact::m_node
Node * m_node
Definition: btSoftBody.h:357
btSoftBody::setSpringStiffness
void setSpringStiffness(btScalar k)
Definition: btSoftBody.cpp:3072
btSoftBody::addAeroForceToNode
void addAeroForceToNode(const btVector3 &windVelocity, int nodeIndex)
Definition: btSoftBody.cpp:575
btSoftBody::setSoftBodySolver
void setSoftBodySolver(btSoftBodySolver *softBodySolver)
Definition: btSoftBody.h:1067
btSoftBody::tMaterialArray
btAlignedObjectArray< Material * > tMaterialArray
Definition: btSoftBody.h:763
btSoftBody::m_tag
void * m_tag
Definition: btSoftBody.h:774
btSoftBody::Config::m_psequence
tPSolverArray m_psequence
Definition: btSoftBody.h:712
btSoftBody::Config::collisions
int collisions
Definition: btSoftBody.h:710
btSoftBody::clusterAImpulse
static void clusterAImpulse(Cluster *cluster, const Impulse &impulse)
Definition: btSoftBody.cpp:1136
btSoftBody::clusterCount
int clusterCount() const
Definition: btSoftBody.cpp:1061
btSoftBody::CJoint::Type
eType::_ Type() const
Definition: btSoftBody.h:680
btSoftBody::m_useFaceContact
bool m_useFaceContact
Definition: btSoftBody.h:804
btSoftBody::Config::drag
btScalar drag
Definition: btSoftBody.h:714
btSoftBody::Body::linearVelocity
btVector3 linearVelocity() const
Definition: btSoftBody.h:528
btSoftBody::clusterVAImpulse
static void clusterVAImpulse(Cluster *cluster, const btVector3 &impulse)
Definition: btSoftBody.cpp:1119
btSoftBody::m_maxSpeedSquared
btScalar m_maxSpeedSquared
Definition: btSoftBody.h:803
btSoftBody::Config::viterations
int viterations
Definition: btSoftBody.h:706
btSoftBody::appendNode
void appendNode(const btVector3 &x, btScalar m)
Definition: btSoftBody.cpp:256
btSoftBody::tFaceArray
btAlignedObjectArray< Face > tFaceArray
Definition: btSoftBody.h:758
btMatrix3x3
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
Definition: btMatrix3x3.h:48
btSoftBody::fCollision::RVSmask
@ RVSmask
Definition: btSoftBody.h:161
btSoftBody::Cluster::m_lv
btVector3 m_lv
Definition: btSoftBody.h:448
btSoftBody::m_useSelfCollision
bool m_useSelfCollision
Definition: btSoftBody.h:809
btSoftBody::Joint::m_bodies
Body m_bodies[2]
Definition: btSoftBody.h:613
btTransform.h
btSoftBody::TetraScratch::m_cofF
btMatrix3x3 m_cofF
Definition: btSoftBody.h:314
btSoftBody::solveCommonConstraints
static void solveCommonConstraints(btSoftBody **bodies, int count, int iterations)
Definition: btSoftBody.cpp:2078
btSoftBody::m_bUpdateRtCst
bool m_bUpdateRtCst
Definition: btSoftBody.h:796
btRigidBody::getInvMass
btScalar getInvMass() const
Definition: btRigidBody.h:263
btSoftBody::Joint::eType
Definition: btSoftBody.h:598
btSoftBody::Cluster::m_maxSelfCollisionImpulse
btScalar m_maxSelfCollisionImpulse
Definition: btSoftBody.h:455
btSoftBody::getSolver
static psolver_t getSolver(ePSolver::_ solver)
Definition: btSoftBody.cpp:3569
btSoftBody::getSoftBodySolver
btSoftBodySolver * getSoftBodySolver()
Definition: btSoftBody.h:1075
btSoftBody::updateNormals
void updateNormals()
Definition: btSoftBody.cpp:2556
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:30
btSoftBody::Tetra::m_c1
btScalar m_c1
Definition: btSoftBody.h:301
btMultiBodyLinkCollider
Definition: btMultiBodyLinkCollider.h:33
btSoftBody::m_renderFaces
tFaceArray m_renderFaces
Definition: btSoftBody.h:781
btSoftBody::predictMotion
void predictMotion(btScalar dt)
Definition: btSoftBody.cpp:1863
btSoftBody::initializeFaceTree
void initializeFaceTree()
Definition: btSoftBody.cpp:2343
btSoftBody::clusterDCImpulse
static void clusterDCImpulse(Cluster *cluster, const btVector3 &impulse)
Definition: btSoftBody.cpp:1143
btSoftBody::updateBounds
void updateBounds()
Definition: btSoftBody.cpp:2585
btSoftBody::eSolverPresets::Default
@ Default
Definition: btSoftBody.h:130
btSoftBodyWorldInfo::m_maxDisplacement
btScalar m_maxDisplacement
Definition: btSoftBody.h:50
btSoftBody::Cluster::m_adamping
btScalar m_adamping
Definition: btSoftBody.h:453
btSoftBody::Pose::m_volume
btScalar m_volume
Definition: btSoftBody.h:424
btSoftBody::setPose
void setPose(bool bvolume, bool bframe)
Definition: btSoftBody.cpp:983
btSoftBody::ePSolver::RContacts
@ RContacts
Anchor solver.
Definition: btSoftBody.h:117
btSoftBody::Impulse::Impulse
Impulse()
Definition: btSoftBody.h:471
btSoftBody::sMedium::m_pressure
btScalar m_pressure
Definition: btSoftBody.h:230
SIMD_INFINITY
#define SIMD_INFINITY
Definition: btScalar.h:544
btSoftBody::Config::kSK_SPLT_CL
btScalar kSK_SPLT_CL
Definition: btSoftBody.h:702
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82
btSoftBody::Link::m_c0
btScalar m_c0
Definition: btSoftBody.h:278
btSoftBody::Face::m_index
int m_index
Definition: btSoftBody.h:292
btSoftBody::setMaxStress
void setMaxStress(btScalar maxStress)
Definition: btSoftBody.cpp:3367
btSoftBody::Element::Element
Element()
Definition: btSoftBody.h:238
btSoftBody::RayFromToCaster::rayFromToTriangle
static btScalar rayFromToTriangle(const btVector3 &rayFrom, const btVector3 &rayTo, const btVector3 &rayNormalizedDirection, const btVector3 &a, const btVector3 &b, const btVector3 &c, btScalar maxt=SIMD_INFINITY)
Definition: btSoftBody.cpp:2148
btSoftBody::sCti::m_normal
btVector3 m_normal
Definition: btSoftBody.h:221
btSoftBody::Config::timescale
btScalar timescale
Definition: btSoftBody.h:705
btSoftBody::RContact::t2
btVector3 t2
Definition: btSoftBody.h:333
btSoftBody::setRestLengthScale
void setRestLengthScale(btScalar restLength)
Definition: btSoftBody.cpp:968
btSoftBody::applyForces
void applyForces()
Definition: btSoftBody.cpp:3299
btSoftBody::ePSolver::END
@ END
Soft contacts solver.
Definition: btSoftBody.h:119
btSoftBody::Material::m_kLST
btScalar m_kLST
Definition: btSoftBody.h:243
btSoftBody::Node::index
int index
Definition: btSoftBody.h:268
btSoftBody::m_softBodySolver
btSoftBodySolver * m_softBodySolver
Definition: btSoftBody.h:78
btSoftBody::sCti::m_offset
btScalar m_offset
Definition: btSoftBody.h:222
btSoftBody::DeformableFaceNodeContact::m_bary
btVector3 m_bary
Definition: btSoftBody.h:379
btSoftBody::Body::activate
void activate() const
Definition: btSoftBody.h:501
btRigidBody::getLinearVelocity
const btVector3 & getLinearVelocity() const
Definition: btRigidBody.h:398
btSoftBody::eSolverPresets::_
_
Definition: btSoftBody.h:127
btSoftBody::fCollision::SVSmask
@ SVSmask
DF based rigid vs deformable faces.
Definition: btSoftBody.h:167
btSoftBody::appendAngularJoint
void appendAngularJoint(const AJoint::Specs &specs, Cluster *body0, Body body1)
Definition: btSoftBody.cpp:533
btSparseSDF.h
btSoftBody::eFeature::Node
@ Node
Definition: btSoftBody.h:141
btSoftBody::getAabb
virtual void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
Definition: btSoftBody.h:1109
btSoftBody::Anchor::m_local
btVector3 m_local
Definition: btSoftBody.h:403
btSoftBody::DeformableRigidContact::m_c0
btMatrix3x3 m_c0
Definition: btSoftBody.h:340
btSoftBody::Tetra::m_rv
btScalar m_rv
Definition: btSoftBody.h:298
btSoftBody::DeformableFaceRigidContact
Definition: btSoftBody.h:367
btSoftBody::Config::kPR
btScalar kPR
Definition: btSoftBody.h:690
btSoftBodyWorldInfo::btSoftBodyWorldInfo
btSoftBodyWorldInfo()
Definition: btSoftBody.h:57
btSoftBody::fCollision::SDF_RDF
@ SDF_RDF
DF based rigid vs deformable.
Definition: btSoftBody.h:165
btSoftBodyWorldInfo::water_offset
btScalar water_offset
Definition: btSoftBody.h:49
btSoftBody::Node::m_area
btScalar m_area
Definition: btSoftBody.h:265
btSoftBody::Node::m_vn
btVector3 m_vn
Definition: btSoftBody.h:261
btSoftBody::~btSoftBody
virtual ~btSoftBody()
Definition: btSoftBody.cpp:126
btSoftBody::getMass
btScalar getMass(int node) const
Definition: btSoftBody.cpp:796
btSoftBody::RayFromToCaster::m_face
Face * m_face
Definition: btSoftBody.h:733
btSoftBody::Joint::Specs::erp
btScalar erp
Definition: btSoftBody.h:609
ATTRIBUTE_ALIGNED16
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:99
btSoftBody::Face::m_leaf
btDbvtNode * m_leaf
Definition: btSoftBody.h:290
btSoftBody::appendLinearJoint
void appendLinearJoint(const LJoint::Specs &specs, Cluster *body0, Body body1)
Definition: btSoftBody.cpp:507
btSoftBody::scale
void scale(const btVector3 &scl)
Definition: btSoftBody.cpp:941
btSoftBody::solveConstraints
void solveConstraints()
Definition: btSoftBody.cpp:1973
btSoftBody::getSoftBodySolver
btSoftBodySolver * getSoftBodySolver() const
Definition: btSoftBody.h:1083
btTransform::getIdentity
static const btTransform & getIdentity()
Return an identity transform.
Definition: btTransform.h:197
btSoftBody::Cluster::m_ndamping
btScalar m_ndamping
Definition: btSoftBody.h:451
btSoftBody::Impulse::m_velocity
btVector3 m_velocity
Definition: btSoftBody.h:467
btSoftBody::eFeature::Face
@ Face
Definition: btSoftBody.h:143
btSoftBody::ImplicitFn::~ImplicitFn
virtual ~ImplicitFn()
Definition: btSoftBody.h:206
btSoftBody::Config::kSHR
btScalar kSHR
Definition: btSoftBody.h:696
btSoftBody::TetraScratch::m_F
btMatrix3x3 m_F
Definition: btSoftBody.h:311
btSoftBody::Link::m_rl
btScalar m_rl
Definition: btSoftBody.h:276
btAlignedObjectArray< const class btCollisionObject * >
btSoftBody::fCollision::_
_
Definition: btSoftBody.h:160
btSoftBody::eVSolver::Linear
@ Linear
Definition: btSoftBody.h:105
btSoftBody::Config::kLF
btScalar kLF
Definition: btSoftBody.h:689
btSoftBody::Body::m_rigid
btRigidBody * m_rigid
Definition: btSoftBody.h:491
btSoftBody::tVSolverArray
btAlignedObjectArray< eVSolver::_ > tVSolverArray
Definition: btSoftBody.h:149
btSoftBody::ImplicitFn::Eval
virtual btScalar Eval(const btVector3 &x)=0
btSoftBody::tJointArray
btAlignedObjectArray< Joint * > tJointArray
Definition: btSoftBody.h:764
btSoftBody::Cluster::m_leaf
btDbvtNode * m_leaf
Definition: btSoftBody.h:450
btSoftBody::Joint::m_drift
btVector3 m_drift
Definition: btSoftBody.h:618
btSoftBody::m_rcontacts
tRContactArray m_rcontacts
Definition: btSoftBody.h:787
btSoftBody::evaluateCom
btVector3 evaluateCom() const
Definition: btSoftBody.cpp:2354
btSoftBody::Joint::eType::Angular
@ Angular
Definition: btSoftBody.h:602
btSoftBody::btSoftBody
btSoftBody(btSoftBodyWorldInfo *worldInfo, int node_count, const btVector3 *x, const btScalar *m)
btSoftBody implementation by Nathanael Presson
Definition: btSoftBody.cpp:28
btSoftBody::getRestLengthScale
btScalar getRestLengthScale()
Definition: btSoftBody.cpp:962
btCollisionCreateFunc.h
btSoftBody::DeformableRigidContact::m_c1
btVector3 m_c1
Definition: btSoftBody.h:341
btSoftBody::Feature::m_material
Material * m_material
Definition: btSoftBody.h:252
btSoftBody::Cluster::m_selfCollisionImpulseFactor
btScalar m_selfCollisionImpulseFactor
Definition: btSoftBody.h:456
btSoftBody::RayFromToCaster::m_mint
btScalar m_mint
Definition: btSoftBody.h:732
btSoftBody::Config::kKHR
btScalar kKHR
Definition: btSoftBody.h:695
btSoftBody::setTotalMass
void setTotalMass(btScalar mass, bool fromfaces=false)
Definition: btSoftBody.cpp:813
btSoftBody::Tetra::m_c2
btScalar m_c2
Definition: btSoftBody.h:302
btSoftBody::Face::m_pcontact
btVector4 m_pcontact
Definition: btSoftBody.h:291
btSoftBody::initializeClusters
void initializeClusters()
Definition: btSoftBody.cpp:2781
btSoftBody::Link::m_c2
btScalar m_c2
Definition: btSoftBody.h:280
btSoftBody::Cluster::m_matching
btScalar m_matching
Definition: btSoftBody.h:454
btSoftBody::Config::m_maxStress
btScalar m_maxStress
Definition: btSoftBody.h:715
btSoftBody::rayTest
bool rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, sRayCast &results)
Ray casting using rayFrom and rayTo in worldspace, (not direction!)
Definition: btSoftBody.cpp:1822
btSoftBody::Body::applyAImpulse
void applyAImpulse(const Impulse &impulse) const
Definition: btSoftBody.h:583
btSerializer
Definition: btSerializer.h:66
btSoftBody::Config::m_dsequence
tPSolverArray m_dsequence
Definition: btSoftBody.h:713
btSoftBody::rotate
void rotate(const btQuaternion &rot)
Definition: btSoftBody.cpp:932
btSoftBody::SContact::m_weights
btVector3 m_weights
Definition: btSoftBody.h:393
btSoftBody::updateLinkConstants
void updateLinkConstants()
Definition: btSoftBody.cpp:2760
btSoftBody::eAeroModel::V_TwoSided
@ V_TwoSided
Vertex normals are oriented toward velocity.
Definition: btSoftBody.h:90
btSoftBody::RContact::m_cti
sCti m_cti
Definition: btSoftBody.h:320
btSoftBody::DeformableNodeRigidAnchor::m_local
btVector3 m_local
Definition: btSoftBody.h:363
btSoftBody::LJoint::Specs::position
btVector3 position
Definition: btSoftBody.h:634
btSoftBody
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
Definition: btSoftBody.h:73
btSoftBody::Node::m_f
btVector3 m_f
Definition: btSoftBody.h:262
btSoftBody::Joint::Solve
virtual void Solve(btScalar dt, btScalar sor)=0
btSoftBody::DeformableFaceNodeContact::m_friction
btScalar m_friction
Definition: btSoftBody.h:383
btSoftBody::eFeature::Link
@ Link
Definition: btSoftBody.h:142
btSoftBody::setTotalDensity
void setTotalDensity(btScalar density)
Definition: btSoftBody.cpp:849
btRigidBody::applyCentralImpulse
void applyCentralImpulse(const btVector3 &impulse)
Definition: btRigidBody.h:316
btSoftBody::Tetra::m_n
Node * m_n[4]
Definition: btSoftBody.h:297
btSoftBody::SContact::m_friction
btScalar m_friction
Definition: btSoftBody.h:396
btSoftBody::Body::applyVImpulse
void applyVImpulse(const btVector3 &impulse, const btVector3 &rpos) const
Definition: btSoftBody.h:550
btSoftBody::Element::m_tag
void * m_tag
Definition: btSoftBody.h:237
btSoftBody::fCollision::CL_RS
@ CL_RS
SDF based rigid vs soft.
Definition: btSoftBody.h:163
btBroadphaseInterface
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
Definition: btBroadphaseInterface.h:50
btSoftBody::LJoint::Prepare
void Prepare(btScalar dt, int iterations)
Definition: btSoftBody.cpp:3136
btSoftBody::appendDeformableAnchor
void appendDeformableAnchor(int node, btRigidBody *body)
Definition: btSoftBody.cpp:415
btIDebugDraw.h
btSoftBody::SolverState::velmrg
btScalar velmrg
Definition: btSoftBody.h:722
btSoftBody::Pose
Definition: btSoftBody.h:421
btSoftBody::checkContact
bool checkContact(const btCollisionObjectWrapper *colObjWrap, const btVector3 &x, btScalar margin, btSoftBody::sCti &cti) const
Definition: btSoftBody.cpp:2367
btSoftBody::m_nodeRigidContacts
btAlignedObjectArray< DeformableNodeRigidContact > m_nodeRigidContacts
Definition: btSoftBody.h:788
btSoftBody::sMedium
Definition: btSoftBody.h:228
btSoftBody::Joint::m_delete
bool m_delete
Definition: btSoftBody.h:621
btSoftBodySolver
Definition: btSoftBodySolvers.h:29
btSoftBody::Config::kCHR
btScalar kCHR
Definition: btSoftBody.h:694
btSoftBody::Cluster::m_collide
bool m_collide
Definition: btSoftBody.h:458
btSoftBody::setCollisionShape
virtual void setCollisionShape(btCollisionShape *collisionShape)
Definition: btSoftBody.h:853
btSoftBody::Body::Body
Body()
Definition: btSoftBody.h:494
btSoftBody::Cluster::m_nvimpulses
int m_nvimpulses
Definition: btSoftBody.h:446
btCollisionObject::getInternalType
int getInternalType() const
reserved for Bullet internal usage
Definition: btCollisionObject.h:362
btSoftBody::appendTetra
void appendTetra(int model, Material *mat)
Definition: btSoftBody.cpp:356
btSoftBody::AJoint::IControl::~IControl
virtual ~IControl()
Definition: btSoftBody.h:647
btSoftBody::LJoint::m_rpos
btVector3 m_rpos[2]
Definition: btSoftBody.h:636
btSoftBody::CJoint::m_normal
btVector3 m_normal
Definition: btSoftBody.h:675
btSoftBody::releaseCluster
void releaseCluster(int index)
Definition: btSoftBody.cpp:1288
btSoftBody::RayFromToCaster
RayFromToCaster takes a ray from, ray to (instead of direction!)
Definition: btSoftBody.h:728
btSoftBody::eAeroModel::V_TwoSidedLiftDrag
@ V_TwoSidedLiftDrag
Vertex normals are flipped to match velocity.
Definition: btSoftBody.h:91
btSoftBody::Joint::eType::Contact
@ Contact
Definition: btSoftBody.h:603
btSoftBody::RContact::t1
btVector3 t1
Definition: btSoftBody.h:332
btSoftBody::Pose::m_wgh
tScalarArray m_wgh
Definition: btSoftBody.h:426
btSoftBody::DeformableFaceNodeContact::m_weights
btVector3 m_weights
Definition: btSoftBody.h:380
btSoftBody::DeformableFaceNodeContact
Definition: btSoftBody.h:376
btSoftBody::DeformableRigidContact::m_cti
sCti m_cti
Definition: btSoftBody.h:339
btRigidBody::getInvInertiaTensorWorld
const btMatrix3x3 & getInvInertiaTensorWorld() const
Definition: btRigidBody.h:265
btSoftBody::Joint::Prepare
virtual void Prepare(btScalar dt, int iterations)
Definition: btSoftBody.cpp:3129
btSoftBody::setVolumeMass
void setVolumeMass(btScalar mass)
Definition: btSoftBody.cpp:855
btSoftBody::AJoint::Type
eType::_ Type() const
Definition: btSoftBody.h:667
btSoftBody::eAeroModel::V_OneSided
@ V_OneSided
Vertex normals are flipped to match velocity and lift and drag forces are applied.
Definition: btSoftBody.h:92
btSoftBody::Cluster::m_vimpulses
btVector3 m_vimpulses[2]
Definition: btSoftBody.h:444
btSoftBody::clusterDImpulse
static void clusterDImpulse(Cluster *cluster, const btVector3 &rpos, const btVector3 &impulse)
Definition: btSoftBody.cpp:1102
btSoftBody::sMedium::m_velocity
btVector3 m_velocity
Definition: btSoftBody.h:229
btSoftBody::CJoint::m_life
int m_life
Definition: btSoftBody.h:672
btSoftBody::setSolver
void setSolver(eSolverPresets::_ preset)
Definition: btSoftBody.cpp:1838
btSoftBody::Config::kVCF
btScalar kVCF
Definition: btSoftBody.h:686
btSoftBody::DeformableFaceNodeContact::m_face
Face * m_face
Definition: btSoftBody.h:378
btSoftBody::Pose::m_pos
tVector3Array m_pos
Definition: btSoftBody.h:425
btSoftBody::setCollisionQuadrature
void setCollisionQuadrature(int N)
Definition: btSoftBody.cpp:3389
btSoftBody::Link::m_bbending
int m_bbending
Definition: btSoftBody.h:277
btSoftBody::Cluster::m_containsAnchor
bool m_containsAnchor
Definition: btSoftBody.h:457
btSoftBody::Body::invMass
btScalar invMass() const
Definition: btSoftBody.h:515
btSoftBody::updateArea
void updateArea(bool averageArea=true)
Definition: btSoftBody.cpp:2696
btSoftBody::m_deformableAnchors
btAlignedObjectArray< DeformableNodeRigidAnchor > m_deformableAnchors
Definition: btSoftBody.h:786
btAlignedObjectArray.h
btSoftBody::fMaterial::END
@ END
Definition: btSoftBody.h:186
btSoftBody::applyClusters
void applyClusters(bool drift)
Definition: btSoftBody.cpp:2996
btSoftBody::DeformableRigidContact::jacobianData_t1
btMultiBodyJacobianData jacobianData_t1
Definition: btSoftBody.h:348
btSoftBody::Joint::Specs::cfm
btScalar cfm
Definition: btSoftBody.h:610
btSoftBody::Cluster::m_masses
tScalarArray m_masses
Definition: btSoftBody.h:435
btSoftBody::Face::m_n
Node * m_n[3]
Definition: btSoftBody.h:287
btSoftBody::Config::aeromodel
eAeroModel::_ aeromodel
Definition: btSoftBody.h:685
btSoftBodyWorldInfo::air_density
btScalar air_density
Definition: btSoftBody.h:47
btSoftBody::eFeature::END
@ END
Definition: btSoftBody.h:145
btSoftBody::Cluster::Cluster
Cluster()
Definition: btSoftBody.h:460
btDbvt::ICollide
Definition: btDbvt.h:270
btSoftBody::cutLink
bool cutLink(int node0, int node1, btScalar position)
Definition: btSoftBody.cpp:1767
btSoftBody::checkDeformableFaceContact
bool checkDeformableFaceContact(const btCollisionObjectWrapper *colObjWrap, Face &f, btVector3 &contact_point, btVector3 &bary, btScalar margin, btSoftBody::sCti &cti, bool predict=false) const
Definition: btSoftBody.cpp:2445
btSoftBody::SolverState::radmrg
btScalar radmrg
Definition: btSoftBody.h:723
btSoftBody::DeformableRigidContact
Definition: btSoftBody.h:337
btMultiBodyConstraint.h
btSoftBody::m_clusters
tClusterArray m_clusters
Definition: btSoftBody.h:800
btSoftBody::Cluster::m_idmass
btScalar m_idmass
Definition: btSoftBody.h:439
btSoftBody::Impulse::operator-
Impulse operator-() const
Definition: btSoftBody.h:472
btSoftBody::setMass
void setMass(int node, btScalar mass)
Definition: btSoftBody.cpp:789
btSoftBody::Pose::m_scl
btMatrix3x3 m_scl
Definition: btSoftBody.h:429
btSoftBody::Joint::m_cfm
btScalar m_cfm
Definition: btSoftBody.h:615
btSoftBody::SContact::m_node
Node * m_node
Definition: btSoftBody.h:391
btSoftBody::DeformableRigidContact::t2
btVector3 t2
Definition: btSoftBody.h:351
btSoftBody::m_collisionDisabledObjects
btAlignedObjectArray< const class btCollisionObject * > m_collisionDisabledObjects
Definition: btSoftBody.h:75
btSoftBody::Impulse::m_asVelocity
int m_asVelocity
Definition: btSoftBody.h:469
btSoftBody::PSolve_Anchors
static void PSolve_Anchors(btSoftBody *psb, btScalar kst, btScalar ti)
Definition: btSoftBody.cpp:3401
btSoftBody::ePSolver::Anchors
@ Anchors
Linear solver.
Definition: btSoftBody.h:116
btSoftBody::TetraScratch::m_trace
btScalar m_trace
Definition: btSoftBody.h:312
btRigidBody::applyImpulse
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
Definition: btRigidBody.h:326
btSoftBody::Link::m_c1
btScalar m_c1
Definition: btSoftBody.h:279
btSoftBody::fCollision::CL_SELF
@ CL_SELF
Cluster vs cluster soft vs soft handling.
Definition: btSoftBody.h:170
btSoftBody::Feature
Definition: btSoftBody.h:251
btSoftBody::TetraScratch
Definition: btSoftBody.h:310
btSoftBodyWorldInfo::m_broadphase
btBroadphaseInterface * m_broadphase
Definition: btSoftBody.h:52
btSoftBody::sRayCast::body
btSoftBody * body
Definition: btSoftBody.h:197
btSoftBody::Material::m_flags
int m_flags
Definition: btSoftBody.h:246
btSoftBody::m_fdbvt
btDbvt m_fdbvt
Definition: btSoftBody.h:798
btSoftBody::generateBendingConstraints
int generateBendingConstraints(int distance, Material *mat=0)
Definition: btSoftBody.cpp:1155
btSoftBody::interpolateRenderMesh
void interpolateRenderMesh()
Definition: btSoftBody.cpp:3373
btSoftBody::Note::m_text
const char * m_text
Definition: btSoftBody.h:413
btSoftBody::sRayCast::feature
eFeature::_ feature
soft body
Definition: btSoftBody.h:198
btSoftBody::eSolverPresets::END
@ END
Definition: btSoftBody.h:131
btSoftBodyWorldInfo::m_sparsesdf
btSparseSdf< 3 > m_sparsesdf
Definition: btSoftBody.h:55
btSoftBody::Joint::m_sdrift
btVector3 m_sdrift
Definition: btSoftBody.h:619
btSoftBody::VSolve_Links
static void VSolve_Links(btSoftBody *psb, btScalar kst)
Definition: btSoftBody.cpp:3555
btSoftBody::Cluster::m_dimpulses
btVector3 m_dimpulses[2]
Definition: btSoftBody.h:445
btSoftBody::CJoint::Solve
void Solve(btScalar dt, btScalar sor)
Definition: btSoftBody.cpp:3246
btSoftBody::tNodeArray
btAlignedObjectArray< Node > tNodeArray
Definition: btSoftBody.h:755
btSoftBody::Impulse::m_asDrift
int m_asDrift
Definition: btSoftBody.h:470
btSoftBody::tSoftBodyArray
btAlignedObjectArray< btSoftBody * > tSoftBodyArray
Definition: btSoftBody.h:765
btDbvtNode
Definition: btDbvt.h:181
btSoftBody::Node::m_im
btScalar m_im
Definition: btSoftBody.h:264
btSoftBody::Note::m_nodes
Node * m_nodes[4]
Definition: btSoftBody.h:416
btSoftBody::eAeroModel
eAeroModel
Definition: btSoftBody.h:86
btSoftBody::advanceDeformation
void advanceDeformation()
Definition: btSoftBody.cpp:3120
btSoftBody::Node::m_v
btVector3 m_v
Definition: btSoftBody.h:259
btSoftBody::clusterImpulse
static void clusterImpulse(Cluster *cluster, const btVector3 &rpos, const Impulse &impulse)
Definition: btSoftBody.cpp:1112
btSoftBody::m_joints
tJointArray m_joints
Definition: btSoftBody.h:792
btSoftBody::RContact::m_c3
btScalar m_c3
Definition: btSoftBody.h:325
btSoftBody::fCollision::Default
@ Default
Vertex vs face soft vs soft handling.
Definition: btSoftBody.h:173
btSoftBody::eVSolver
eVSolver : velocities solvers
Definition: btSoftBody.h:102
btSoftBody::addForce
void addForce(const btVector3 &force)
Definition: btSoftBody.cpp:560
btSoftBody::eFeature::None
@ None
Definition: btSoftBody.h:140
btSoftBody::eSolverPresets
eSolverPresets
Definition: btSoftBody.h:125
btSoftBody::eAeroModel::F_TwoSided
@ F_TwoSided
Vertex normals are taken as it is.
Definition: btSoftBody.h:93
btSoftBody::Config::kSS_SPLT_CL
btScalar kSS_SPLT_CL
Definition: btSoftBody.h:703
btSoftBody::translate
void translate(const btVector3 &trs)
Definition: btSoftBody.cpp:923
btSoftBodyWorldInfo::water_density
btScalar water_density
Definition: btSoftBody.h:48
btSoftBody::clusterVImpulse
static void clusterVImpulse(Cluster *cluster, const btVector3 &rpos, const btVector3 &impulse)
Definition: btSoftBody.cpp:1090
btSoftBody::CJoint::m_maxlife
int m_maxlife
Definition: btSoftBody.h:673
btSoftBody::tScalarArray
btAlignedObjectArray< btScalar > tScalarArray
Definition: btSoftBody.h:214
btSoftBody::DeformableRigidContact::t1
btVector3 t1
Definition: btSoftBody.h:350
btSoftBody::updateClusters
void updateClusters()
Definition: btSoftBody.cpp:2848
btSoftBody::Config::kSSHR_CL
btScalar kSSHR_CL
Definition: btSoftBody.h:700
btSoftBody::Material
Definition: btSoftBody.h:242
btSoftBody::RContact::jacobianData_normal
btMultiBodyJacobianData jacobianData_normal
Definition: btSoftBody.h:329
btDbvt.h
btRigidBody::upcast
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
Definition: btRigidBody.h:189
btSoftBody::initializeDmInverse
void initializeDmInverse()
Definition: btSoftBody.cpp:3080
btSoftBody::getTotalMass
btScalar getTotalMass() const
Definition: btSoftBody.cpp:802
btSoftBody::clusterDAImpulse
static void clusterDAImpulse(Cluster *cluster, const btVector3 &impulse)
Definition: btSoftBody.cpp:1128
btSoftBody::Impulse::operator*
Impulse operator*(btScalar x) const
Definition: btSoftBody.h:479
btSoftBody::eFeature
eFeature
Definition: btSoftBody.h:137
btSoftBody::DeformableRigidContact::m_c2
btScalar m_c2
Definition: btSoftBody.h:342
btSoftBody::DeformableFaceNodeContact::m_margin
btScalar m_margin
Definition: btSoftBody.h:382
btSoftBody::RayFromToCaster::m_rayNormalizedDirection
btVector3 m_rayNormalizedDirection
Definition: btSoftBody.h:731
btSoftBody::SContact
Definition: btSoftBody.h:390
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:142
btSoftBody::m_nodes
tNodeArray m_nodes
Definition: btSoftBody.h:777
btSoftBody::sRayCast::index
int index
feature type
Definition: btSoftBody.h:199
btSoftBody::setVelocity
void setVelocity(const btVector3 &velocity)
Definition: btSoftBody.cpp:766
btSoftBody::m_dampingCoefficient
btScalar m_dampingCoefficient
Definition: btSoftBody.h:801
btSoftBody::RayFromToCaster::m_rayFrom
btVector3 m_rayFrom
Definition: btSoftBody.h:729
btSoftBody::CJoint::Terminate
void Terminate(btScalar dt)
Definition: btSoftBody.cpp:3289
btSoftBody::SolverState::sdt
btScalar sdt
Definition: btSoftBody.h:720
btSoftBody::Tetra::m_Dm_inverse
btMatrix3x3 m_Dm_inverse
Definition: btSoftBody.h:303
btSoftBody::Body::applyDCImpulse
void applyDCImpulse(const btVector3 &impulse) const
Definition: btSoftBody.h:588
btSoftBody::tLeafArray
btAlignedObjectArray< btDbvtNode * > tLeafArray
Definition: btSoftBody.h:756
btSoftBody::AJoint::IControl
Definition: btSoftBody.h:646
btSoftBody::LJoint
Definition: btSoftBody.h:631
btSoftBody::RContact::m_c2
btScalar m_c2
Definition: btSoftBody.h:324
btSoftBody::Joint
Definition: btSoftBody.h:596
btSoftBody::Config::kSR_SPLT_CL
btScalar kSR_SPLT_CL
Definition: btSoftBody.h:701
btSoftBody::DeformableFaceRigidContact::m_face
Face * m_face
Definition: btSoftBody.h:369