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

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btReducedDeformableBodySolver.h
Go to the documentation of this file.
1#ifndef BT_REDUCED_DEFORMABLE_BODY_DYNAMICS_WORLD_H
2#define BT_REDUCED_DEFORMABLE_BODY_DYNAMICS_WORLD_H
3
4#include "BulletSoftBody/btDeformableBodySolver.h"
5#include "btReducedDeformableContactConstraint.h"
6
7class btReducedDeformableBody;
8
9 class btReducedDeformableBodySolver : public btDeformableBodySolver
10{
11 protected:
12 bool m_ascendOrder;
13 btScalar m_dampingAlpha;
14 btScalar m_dampingBeta;
15
16 btVector3 m_gravity;
17
18 void predictReduceDeformableMotion(btScalar solverdt);
19
20 void applyExplicitForce(btScalar solverdt);
21
22 public:
23 btAlignedObjectArray<btAlignedObjectArray<btReducedDeformableStaticConstraint> > m_staticConstraints;
24 btAlignedObjectArray<btAlignedObjectArray<btReducedDeformableNodeRigidContactConstraint> > m_nodeRigidConstraints;
25 btAlignedObjectArray<btAlignedObjectArray<btReducedDeformableFaceRigidContactConstraint> > m_faceRigidConstraints;
26
27 btReducedDeformableBodySolver();
28 ~btReducedDeformableBodySolver() {}
29
30 virtual void setGravity(const btVector3& gravity);
31
32 virtual SolverTypes getSolverType() const
33 {
34 return REDUCED_DEFORMABLE_SOLVER;
35 }
36
37 // resize/clear data structures
38 virtual void reinitialize(const btAlignedObjectArray<btSoftBody*>& bodies, btScalar dt);
39
40 virtual void predictMotion(btScalar solverdt);
41
42 virtual void applyTransforms(btScalar timeStep);
43
44 // set up contact constraints
45 virtual void setConstraints(const btContactSolverInfo& infoGlobal);
46
47 // solve all constraints (fixed and contact)
48 virtual btScalar solveContactConstraints(btCollisionObject** deformableBodies, int numDeformableBodies, const btContactSolverInfo& infoGlobal);
49
50 // apply all the delta velocities
51 virtual void deformableBodyInternalWriteBack();
52
53 // virtual void setProjection() {}
54
55 // virtual void setLagrangeMultiplier() {}
56
57 // virtual void setupDeformableSolve(bool implicit);
58
59};
60
61#endif // BT_REDUCED_DEFORMABLE_BODY_DYNAMICS_WORLD_H
btDeformableBodySolver.h
btReducedDeformableContactConstraint.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btAlignedObjectArray
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
Definition: btAlignedObjectArray.h:46
btCollisionObject
btCollisionObject can be used to manage collision detection objects.
Definition: btCollisionObject.h:51
btDeformableBodySolver
Definition: btDeformableBodySolver.h:31
btDeformableBodySolver::applyExplicitForce
virtual void applyExplicitForce()
Definition: btDeformableBodySolver.cpp:509
btReducedDeformableBodySolver
Definition: btReducedDeformableBodySolver.h:10
btReducedDeformableBodySolver::m_dampingBeta
btScalar m_dampingBeta
Definition: btReducedDeformableBodySolver.h:14
btReducedDeformableBodySolver::predictMotion
virtual void predictMotion(btScalar solverdt)
Predict motion of soft bodies into next timestep.
Definition: btReducedDeformableBodySolver.cpp:77
btReducedDeformableBodySolver::btReducedDeformableBodySolver
btReducedDeformableBodySolver()
Definition: btReducedDeformableBodySolver.cpp:4
btReducedDeformableBodySolver::solveContactConstraints
virtual btScalar solveContactConstraints(btCollisionObject **deformableBodies, int numDeformableBodies, const btContactSolverInfo &infoGlobal)
Definition: btReducedDeformableBodySolver.cpp:242
btReducedDeformableBodySolver::setConstraints
virtual void setConstraints(const btContactSolverInfo &infoGlobal)
Definition: btReducedDeformableBodySolver.cpp:196
btReducedDeformableBodySolver::m_ascendOrder
bool m_ascendOrder
Definition: btReducedDeformableBodySolver.h:12
btReducedDeformableBodySolver::setGravity
virtual void setGravity(const btVector3 &gravity)
Definition: btReducedDeformableBodySolver.cpp:13
btReducedDeformableBodySolver::m_gravity
btVector3 m_gravity
Definition: btReducedDeformableBodySolver.h:16
btReducedDeformableBodySolver::~btReducedDeformableBodySolver
~btReducedDeformableBodySolver()
Definition: btReducedDeformableBodySolver.h:28
btReducedDeformableBodySolver::getSolverType
virtual SolverTypes getSolverType() const
Return the type of the solver.
Definition: btReducedDeformableBodySolver.h:32
btReducedDeformableBodySolver::deformableBodyInternalWriteBack
virtual void deformableBodyInternalWriteBack()
Definition: btReducedDeformableBodySolver.cpp:316
btReducedDeformableBodySolver::m_nodeRigidConstraints
btAlignedObjectArray< btAlignedObjectArray< btReducedDeformableNodeRigidContactConstraint > > m_nodeRigidConstraints
Definition: btReducedDeformableBodySolver.h:24
btReducedDeformableBodySolver::reinitialize
virtual void reinitialize(const btAlignedObjectArray< btSoftBody * > &bodies, btScalar dt)
Definition: btReducedDeformableBodySolver.cpp:18
btReducedDeformableBodySolver::m_staticConstraints
btAlignedObjectArray< btAlignedObjectArray< btReducedDeformableStaticConstraint > > m_staticConstraints
Definition: btReducedDeformableBodySolver.h:23
btReducedDeformableBodySolver::applyTransforms
virtual void applyTransforms(btScalar timeStep)
Definition: btReducedDeformableBodySolver.cpp:163
btReducedDeformableBodySolver::m_dampingAlpha
btScalar m_dampingAlpha
Definition: btReducedDeformableBodySolver.h:13
btReducedDeformableBodySolver::predictReduceDeformableMotion
void predictReduceDeformableMotion(btScalar solverdt)
Definition: btReducedDeformableBodySolver.cpp:87
btReducedDeformableBodySolver::m_faceRigidConstraints
btAlignedObjectArray< btAlignedObjectArray< btReducedDeformableFaceRigidContactConstraint > > m_faceRigidConstraints
Definition: btReducedDeformableBodySolver.h:25
btReducedDeformableBody
Definition: btReducedDeformableBody.h:12
btSoftBodySolver::SolverTypes
SolverTypes
Definition: btSoftBodySolvers.h:32
btSoftBodySolver::REDUCED_DEFORMABLE_SOLVER
@ REDUCED_DEFORMABLE_SOLVER
Definition: btSoftBodySolvers.h:40
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:82
btContactSolverInfo
Definition: btContactSolverInfo.h:76