Bullet Collision Detection & Physics Library
|
#include <btSoftBodySolver_DX11.h>
Classes | |
struct | AddVelocityCB |
struct | ApplyForcesCB |
class | btAcceleratedSoftBodyInterface |
SoftBody class to maintain information about a soft body instance within a solver. More... | |
struct | CollisionObjectIndices |
struct | CollisionShapeDescription |
Entry in the collision shape array. More... | |
struct | ComputeBoundsCB |
struct | IntegrateCB |
struct | PrepareLinksCB |
struct | SolveCollisionsAndUpdateVelocitiesCB |
struct | SolvePositionsFromLinksKernelCB |
struct | UIntVector3 |
struct | UpdatePositionsFromVelocitiesCB |
struct | UpdateSoftBodiesCB |
struct | UpdateVelocitiesFromPositionsWithoutVelocitiesCB |
struct | UpdateVelocitiesFromPositionsWithVelocitiesCB |
struct | VSolveLinksCB |
Public Member Functions | |
btDX11SoftBodySolver (ID3D11Device *dx11Device, ID3D11DeviceContext *dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory=&D3DX11CompileFromMemory) | |
virtual | ~btDX11SoftBodySolver () |
virtual SolverTypes | getSolverType () const |
Return the type of the solver. More... | |
void | setEnableUpdateBounds (bool enableBounds) |
bool | getEnableUpdateBounds () const |
virtual btSoftBodyLinkData & | getLinkData () |
virtual btSoftBodyVertexData & | getVertexData () |
virtual btSoftBodyTriangleData & | getTriangleData () |
btAcceleratedSoftBodyInterface * | findSoftBodyInterface (const btSoftBody *const softBody) |
const btAcceleratedSoftBodyInterface *const | findSoftBodyInterface (const btSoftBody *const softBody) const |
virtual bool | checkInitialized () |
Ensure that this solver is initialized. More... | |
virtual void | updateSoftBodies () |
Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes. More... | |
virtual void | optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false) |
Optimize soft bodies in this solver. More... | |
virtual void | copyBackToSoftBodies (bool bMove=true) |
Copy necessary data back to the original soft body source objects. More... | |
virtual void | solveConstraints (float solverdt) |
Solve constraints for a set of soft bodies. More... | |
virtual void | predictMotion (float solverdt) |
Predict motion of soft bodies into next timestep. More... | |
virtual void | processCollision (btSoftBody *, const btCollisionObjectWrapper *) |
virtual void | processCollision (btSoftBody *, btSoftBody *) |
Process a collision between two soft bodies. More... | |
Public Member Functions inherited from btSoftBodySolver | |
btSoftBodySolver () | |
virtual | ~btSoftBodySolver () |
virtual void | processCollision (btSoftBody *, const struct btCollisionObjectWrapper *)=0 |
Process a collision between one of the world's soft bodies and another collision object. More... | |
virtual void | setNumberOfPositionIterations (int iterations) |
Set the number of velocity constraint solver iterations this solver uses. More... | |
virtual int | getNumberOfPositionIterations () |
Get the number of velocity constraint solver iterations this solver uses. More... | |
virtual void | setNumberOfVelocityIterations (int iterations) |
Set the number of velocity constraint solver iterations this solver uses. More... | |
virtual int | getNumberOfVelocityIterations () |
Get the number of velocity constraint solver iterations this solver uses. More... | |
float | getTimeScale () |
Return the timescale that the simulation is using. More... | |
Public Attributes | |
btSoftBodyLinkDataDX11 | m_linkData |
Link data for all cloths. More... | |
btSoftBodyVertexDataDX11 | m_vertexData |
btSoftBodyTriangleDataDX11 | m_triangleData |
Protected Member Functions | |
virtual void | integrate (float solverdt) |
Integrate motion on the solver. More... | |
float | computeTriangleArea (const Vectormath::Aos::Point3 &vertex0, const Vectormath::Aos::Point3 &vertex1, const Vectormath::Aos::Point3 &vertex2) |
virtual bool | buildShaders () |
void | resetNormalsAndAreas (int numVertices) |
void | normalizeNormalsAndAreas (int numVertices) |
void | executeUpdateSoftBodies (int firstTriangle, int numTriangles) |
void | prepareCollisionConstraints () |
Sort the collision object details array and generate indexing into it for the per-cloth collision object array. More... | |
Vectormath::Aos::Vector3 | ProjectOnAxis (const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a) |
void | ApplyClampedForce (float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce) |
virtual void | applyForces (float solverdt) |
virtual void | updateConstants (float timeStep) |
int | findSoftBodyIndex (const btSoftBody *const softBody) |
virtual void | prepareLinks () |
void | updatePositionsFromVelocities (float solverdt) |
void | solveLinksForPosition (int startLink, int numLinks, float kst, float ti) |
void | solveLinksForVelocity (int startLink, int numLinks, float kst) |
void | updateVelocitiesFromPositionsWithVelocities (float isolverdt) |
void | updateVelocitiesFromPositionsWithoutVelocities (float isolverdt) |
void | computeBounds () |
void | solveCollisionsAndUpdateVelocities (float isolverdt) |
void | updateBounds () |
void | releaseKernels () |
Additional Inherited Members | |
Public Types inherited from btSoftBodySolver | |
enum | SolverTypes { DEFAULT_SOLVER, CPU_SOLVER, CL_SOLVER, CL_SIMD_SOLVER, DX_SOLVER, DX_SIMD_SOLVER } |
Definition at line 76 of file btSoftBodySolver_DX11.h.
btDX11SoftBodySolver::btDX11SoftBodySolver | ( | ID3D11Device * | dx11Device, |
ID3D11DeviceContext * | dx11Context, | ||
DXFunctions::CompileFromMemoryFunc | dx11CompileFromMemory = &D3DX11CompileFromMemory |
||
) |
Definition at line 574 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Definition at line 603 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 985 of file btSoftBodySolver_DX11.cpp.
|
protectedvirtual |
Definition at line 996 of file btSoftBodySolver_DX11.cpp.
|
protectedvirtual |
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 2078 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Ensure that this solver is initialized.
Implements btSoftBodySolver.
Definition at line 815 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1651 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1118 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Copy necessary data back to the original soft body source objects.
Implements btSoftBodySolver.
Definition at line 646 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 903 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1796 of file btSoftBodySolver_DX11.cpp.
btDX11SoftBodySolver::btAcceleratedSoftBodyInterface * btDX11SoftBodySolver::findSoftBodyInterface | ( | const btSoftBody *const | softBody | ) |
Definition at line 1774 of file btSoftBodySolver_DX11.cpp.
const btDX11SoftBodySolver::btAcceleratedSoftBodyInterface *const btDX11SoftBodySolver::findSoftBodyInterface | ( | const btSoftBody *const | softBody | ) | const |
Definition at line 1785 of file btSoftBodySolver_DX11.cpp.
|
inline |
Definition at line 584 of file btSoftBodySolver_DX11.h.
|
virtual |
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 797 of file btSoftBodySolver_DX11.cpp.
|
inlinevirtual |
Return the type of the solver.
Implements btSoftBodySolver.
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 575 of file btSoftBodySolver_DX11.h.
|
virtual |
Definition at line 809 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Definition at line 803 of file btSoftBodySolver_DX11.cpp.
|
protectedvirtual |
Integrate motion on the solver.
Definition at line 1069 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 861 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Optimize soft bodies in this solver.
Implements btSoftBodySolver.
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 678 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Predict motion of soft bodies into next timestep.
Implements btSoftBodySolver.
Definition at line 2204 of file btSoftBodySolver_DX11.cpp.
|
protected |
Sort the collision object details array and generate indexing into it for the per-cloth collision object array.
Definition at line 1235 of file btSoftBodySolver_DX11.cpp.
|
protectedvirtual |
Definition at line 1362 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Definition at line 2165 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Process a collision between two soft bodies.
Implements btSoftBodySolver.
Definition at line 2159 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 980 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 608 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 824 of file btSoftBodySolver_DX11.cpp.
|
inline |
Definition at line 580 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 1695 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Solve constraints for a set of soft bodies.
Implements btSoftBodySolver.
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 1287 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1449 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1499 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1131 of file btSoftBodySolver_DX11.cpp.
|
protectedvirtual |
Reimplemented in btDX11SIMDAwareSoftBodySolver.
Definition at line 1204 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1407 of file btSoftBodySolver_DX11.cpp.
|
virtual |
Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes.
Implements btSoftBodySolver.
Definition at line 948 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1600 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 1548 of file btSoftBodySolver_DX11.cpp.
|
protected |
Definition at line 505 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 515 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 512 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 411 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 504 of file btSoftBodySolver_DX11.h.
|
protected |
Collision shapes being passed across to the cloths in this solver.
Definition at line 473 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 474 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 409 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 408 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 435 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 468 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 445 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 457 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 499 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 453 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 492 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 461 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 483 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 449 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 441 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 517 of file btSoftBodySolver_DX11.h.
btSoftBodyLinkDataDX11 btDX11SoftBodySolver::m_linkData |
Link data for all cloths.
Note that this will be sorted batch-wise for efficient computation and m_linkAddresses will maintain the addressing.
Definition at line 414 of file btSoftBodySolver_DX11.h.
|
protected |
Acceleration value to be applied to all non-static vertices in the solver.
Index n is cloth n, array sized by number of cloths in the world not the solver.
Definition at line 434 of file btSoftBodySolver_DX11.h.
|
protected |
Collision shape details: pair of index of first collision shape for the cloth and number of collision objects.
Definition at line 467 of file btSoftBodySolver_DX11.h.
|
protected |
Velocity damping factor.
Definition at line 444 of file btSoftBodySolver_DX11.h.
|
protected |
Drag parameter for wind effect on cloth.
Definition at line 456 of file btSoftBodySolver_DX11.h.
|
protected |
Friction coefficient for each cloth.
Definition at line 498 of file btSoftBodySolver_DX11.h.
|
protected |
Lift parameter for wind effect on cloth.
Definition at line 452 of file btSoftBodySolver_DX11.h.
|
protected |
Maximum bounds for each cloth.
Updated by GPU and returned for use by broad phase. These are int vectors as a reminder that they store the int representation of a float, not a float. Bit 31 is inverted - is floats are stored with int-sortable values.
Definition at line 491 of file btSoftBodySolver_DX11.h.
|
protected |
Density of the medium in which each cloth sits.
Definition at line 460 of file btSoftBodySolver_DX11.h.
|
protected |
Minimum bounds for each cloth.
Updated by GPU and returned for use by broad phase. These are int vectors as a reminder that they store the int representation of a float, not a float. Bit 31 is inverted - is floats are stored with int-sortable values.
Definition at line 482 of file btSoftBodySolver_DX11.h.
|
protected |
Velocity correction coefficient.
Definition at line 448 of file btSoftBodySolver_DX11.h.
|
protected |
Wind velocity to be applied normal to all non-static vertices in the solver.
Index n is cloth n, array sized by number of cloths in the world not the solver.
Definition at line 440 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 423 of file btSoftBodySolver_DX11.h.
|
protected |
Cloths owned by this solver.
Only our cloths are in this array.
Definition at line 429 of file btSoftBodySolver_DX11.h.
btSoftBodyTriangleDataDX11 btDX11SoftBodySolver::m_triangleData |
Definition at line 416 of file btSoftBodySolver_DX11.h.
|
protected |
Variable to define whether we need to update solver constants on the next iteration.
Definition at line 421 of file btSoftBodySolver_DX11.h.
btSoftBodyVertexDataDX11 btDX11SoftBodySolver::m_vertexData |
Definition at line 415 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 511 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 501 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 510 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 509 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 502 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 506 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 513 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 507 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 508 of file btSoftBodySolver_DX11.h.
|
protected |
Definition at line 503 of file btSoftBodySolver_DX11.h.