Bullet Collision Detection & Physics Library: btSoftBodyInternals.h File Reference

Bullet Collision Detection & Physics Library

Classes | Functions
btSoftBodyInternals.h File Reference
`#include "btSoftBody.h"`
`#include "LinearMath/btQuickprof.h"`
`#include "LinearMath/btPolarDecomposition.h"`
`#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"`
`#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"`
`#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"`
`#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"`
`#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"`
`#include "BulletDynamics/Featherstone/btMultiBodyConstraint.h"`
`#include <string.h>`
`#include <cmath>`
Include dependency graph for btSoftBodyInternals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | btSymMatrix< T >
class | btSoftBodyCollisionShape
class | btSoftClusterCollisionShape
struct | btEigen
struct | btSoftColliders
struct | btSoftColliders::ClusterBase
struct | btSoftColliders::CollideCL_RS
struct | btSoftColliders::CollideCL_SS
struct | btSoftColliders::CollideSDF_RS
struct | btSoftColliders::CollideSDF_RD
struct | btSoftColliders::CollideSDF_RDF
struct | btSoftColliders::CollideVF_SS
struct | btSoftColliders::CollideVF_DD
struct | btSoftColliders::CollideFF_DD

## Functions
static void | findJacobian (const btMultiBodyLinkCollider *multibodyLinkCol, btMultiBodyJacobianData &jacobianData, const btVector3 &contact_point, const btVector3 &dir)
| btSoftBody implementation by Nathanael Presson More...
static btVector3 | generateUnitOrthogonalVector (const btVector3 &u)
template<typename T >
static void | ZeroInitialize (T &value)
template<typename T >
static bool | CompLess (const T &a, const T &b)
template<typename T >
static bool | CompGreater (const T &a, const T &b)
template<typename T >
static T | Lerp (const T &a, const T &b, btScalar t)
template<typename T >
static T | InvLerp (const T &a, const T &b, btScalar t)
static btMatrix3x3 | Lerp (const btMatrix3x3 &a, const btMatrix3x3 &b, btScalar t)
static btVector3 | Clamp (const btVector3 &v, btScalar maxlength)
template<typename T >
static T | Clamp (const T &x, const T &l, const T &h)
template<typename T >
static T | Sq (const T &x)
template<typename T >
static T | Cube (const T &x)
template<typename T >
static T | Sign (const T &x)
template<typename T >
static bool | SameSign (const T &x, const T &y)
static btScalar | ClusterMetric (const btVector3 &x, const btVector3 &y)
static btMatrix3x3 | ScaleAlongAxis (const btVector3 &a, btScalar s)
static btMatrix3x3 | Cross (const btVector3 &v)
static btMatrix3x3 | Diagonal (btScalar x)
static btMatrix3x3 | Diagonal (const btVector3 &v)
static btScalar | Dot (const btScalar *a, const btScalar *b, int ndof)
static btMatrix3x3 | OuterProduct (const btScalar *v1, const btScalar *v2, const btScalar *v3, const btScalar *u1, const btScalar *u2, const btScalar *u3, int ndof)
static btMatrix3x3 | Add (const btMatrix3x3 &a, const btMatrix3x3 &b)
static btMatrix3x3 | Sub (const btMatrix3x3 &a, const btMatrix3x3 &b)
static btMatrix3x3 | Mul (const btMatrix3x3 &a, btScalar b)
static void | Orthogonalize (btMatrix3x3 &m)
static btMatrix3x3 | MassMatrix (btScalar im, const btMatrix3x3 &iwi, const btVector3 &r)
static btMatrix3x3 | ImpulseMatrix (btScalar dt, btScalar ima, btScalar imb, const btMatrix3x3 &iwi, const btVector3 &r)
static btMatrix3x3 | ImpulseMatrix (btScalar ima, const btMatrix3x3 &iia, const btVector3 &ra, btScalar imb, const btMatrix3x3 &iib, const btVector3 &rb)
static btMatrix3x3 | AngularImpulseMatrix (const btMatrix3x3 &iia, const btMatrix3x3 &iib)
static btVector3 | ProjectOnAxis (const btVector3 &v, const btVector3 &a)
static btVector3 | ProjectOnPlane (const btVector3 &v, const btVector3 &a)
static void | ProjectOrigin (const btVector3 &a, const btVector3 &b, btVector3 &prj, btScalar &sqd)
static void | ProjectOrigin (const btVector3 &a, const btVector3 &b, const btVector3 &c, btVector3 &prj, btScalar &sqd)
static bool | rayIntersectsTriangle (const btVector3 &origin, const btVector3 &dir, const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, btScalar &t)
static bool | lineIntersectsTriangle (const btVector3 &rayStart, const btVector3 &rayEnd, const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, btVector3 &sect, btVector3 &normal)
template<typename T >
static T | BaryEval (const T &a, const T &b, const T &c, const btVector3 &coord)
static btVector3 | BaryCoord (const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &p)
static btScalar | ImplicitSolve (btSoftBody::ImplicitFn *fn, const btVector3 &a, const btVector3 &b, const btScalar accuracy, const int maxiterations=256)
static void | EvaluateMedium (const btSoftBodyWorldInfo *wfi, const btVector3 &x, btSoftBody::sMedium &medium)
static btVector3 | NormalizeAny (const btVector3 &v)
static btDbvtVolume | VolumeOf (const btSoftBody::Face &f, btScalar margin)
static btVector3 | CenterOf (const btSoftBody::Face &f)
static btScalar | AreaOf (const btVector3 &x0, const btVector3 &x1, const btVector3 &x2)
static btScalar | VolumeOf (const btVector3 &x0, const btVector3 &x1, const btVector3 &x2, const btVector3 &x3)
static void | ApplyClampedForce (btSoftBody::Node &n, const btVector3 &f, btScalar dt)
static int | MatchEdge (const btSoftBody::Node *a, const btSoftBody::Node *b, const btSoftBody::Node *ma, const btSoftBody::Node *mb)
static int | PolarDecompose (const btMatrix3x3 &m, btMatrix3x3 &q, btMatrix3x3 &s)

## Function Documentation

## ◆ Add()

static btMatrix3x3 Add | ( | const btMatrix3x3 & | a,
|  | const btMatrix3x3 & | b
| ) |  |
| inlinestatic

Definition at line 378 of file btSoftBodyInternals.h.

## ◆ AngularImpulseMatrix()

static btMatrix3x3 AngularImpulseMatrix | ( | const btMatrix3x3 & | iia,
|  | const btMatrix3x3 & | iib
| ) |  |
| inlinestatic

Definition at line 433 of file btSoftBodyInternals.h.

## ◆ ApplyClampedForce()

static void ApplyClampedForce | ( | btSoftBody::Node & | n,
|  | const btVector3 & | f,
|  | btScalar | dt
| ) |  |
| inlinestatic

Definition at line 708 of file btSoftBodyInternals.h.

## ◆ AreaOf()

static btScalar AreaOf | ( | const btVector3 & | x0,
|  | const btVector3 & | x1,
|  | const btVector3 & | x2
| ) |  |
| inlinestatic

Definition at line 682 of file btSoftBodyInternals.h.

## ◆ BaryCoord()

static btVector3 BaryCoord | ( | const btVector3 & | a,
|  | const btVector3 & | b,
|  | const btVector3 & | c,
|  | const btVector3 & | p
| ) |  |
| inlinestatic

Definition at line 587 of file btSoftBodyInternals.h.

## ◆ BaryEval()

template<typename T >

static T BaryEval | ( | const T & | a,
|  | const T & | b,
|  | const T & | c,
|  | const btVector3 & | coord
| ) |  |
| inlinestatic

Definition at line 579 of file btSoftBodyInternals.h.

## ◆ CenterOf()

static btVector3 CenterOf | ( | const btSoftBody::Face & | f | ) |
| inlinestatic

Definition at line 676 of file btSoftBodyInternals.h.

## ◆ Clamp() [1/2]

static btVector3 Clamp | ( | const btVector3 & | v,
|  | btScalar | maxlength
| ) |  |
| inlinestatic

Definition at line 260 of file btSoftBodyInternals.h.

## ◆ Clamp() [2/2]

template<typename T >

static T Clamp | ( | const T & | x,
|  | const T & | l,
|  | const T & | h
| ) |  |
| inlinestatic

Definition at line 270 of file btSoftBodyInternals.h.

## ◆ ClusterMetric()

static btScalar ClusterMetric | ( | const btVector3 & | x,
|  | const btVector3 & | y
| ) |  |
| inlinestatic

Definition at line 299 of file btSoftBodyInternals.h.

## ◆ CompGreater()

template<typename T >

static bool CompGreater | ( | const T & | a,
|  | const T & | b
| ) |  |
| inlinestatic

Definition at line 232 of file btSoftBodyInternals.h.

## ◆ CompLess()

template<typename T >

static bool CompLess | ( | const T & | a,
|  | const T & | b
| ) |  |
| inlinestatic

Definition at line 226 of file btSoftBodyInternals.h.

## ◆ Cross()

static btMatrix3x3 Cross | ( | const btVector3 & | v | ) |
| inlinestatic

Definition at line 320 of file btSoftBodyInternals.h.

## ◆ Cube()

template<typename T >

static T Cube | ( | const T & | x | ) |
| inlinestatic

Definition at line 282 of file btSoftBodyInternals.h.

## ◆ Diagonal() [1/2]

static btMatrix3x3 Diagonal | ( | btScalar | x | ) |
| inlinestatic

Definition at line 329 of file btSoftBodyInternals.h.

## ◆ Diagonal() [2/2]

static btMatrix3x3 Diagonal | ( | const btVector3 & | v | ) |
| inlinestatic

Definition at line 338 of file btSoftBodyInternals.h.

## ◆ Dot()

static btScalar Dot | ( | const btScalar * | a,
|  | const btScalar * | b,
|  | int | ndof
| ) |  |
| inlinestatic

Definition at line 347 of file btSoftBodyInternals.h.

## ◆ EvaluateMedium()

static void EvaluateMedium | ( | const btSoftBodyWorldInfo * | wfi,
|  | const btVector3 & | x,
|  | btSoftBody::sMedium & | medium
| ) |  |
| inlinestatic

Definition at line 635 of file btSoftBodyInternals.h.

## ◆ findJacobian()

static void findJacobian | ( | const btMultiBodyLinkCollider * | multibodyLinkCol,
|  | btMultiBodyJacobianData & | jacobianData,
|  | const btVector3 & | contact_point,
|  | const btVector3 & | dir
| ) |  |
| static

btSoftBody implementation by Nathanael Presson

Definition at line 34 of file btSoftBodyInternals.h.

## ◆ generateUnitOrthogonalVector()

static btVector3 generateUnitOrthogonalVector | ( | const btVector3 & | u | ) |
| static

Definition at line 47 of file btSoftBodyInternals.h.

## ◆ ImplicitSolve()

static btScalar ImplicitSolve | ( | btSoftBody::ImplicitFn * | fn,
|  | const btVector3 & | a,
|  | const btVector3 & | b,
|  | const btScalar | accuracy,
|  | const int | maxiterations = `256`
| ) |  |
| inlinestatic

Definition at line 600 of file btSoftBodyInternals.h.

## ◆ ImpulseMatrix() [1/2]

static btMatrix3x3 ImpulseMatrix | ( | btScalar | dt,
|  | btScalar | ima,
|  | btScalar | imb,
|  | const btMatrix3x3 & | iwi,
|  | const btVector3 & | r
| ) |  |
| inlinestatic

Definition at line 416 of file btSoftBodyInternals.h.

## ◆ ImpulseMatrix() [2/2]

static btMatrix3x3 ImpulseMatrix | ( | btScalar | ima,
|  | const btMatrix3x3 & | iia,
|  | const btVector3 & | ra,
|  | btScalar | imb,
|  | const btMatrix3x3 & | iib,
|  | const btVector3 & | rb
| ) |  |
| inlinestatic

Definition at line 426 of file btSoftBodyInternals.h.

## ◆ InvLerp()

template<typename T >

static T InvLerp | ( | const T & | a,
|  | const T & | b,
|  | btScalar | t
| ) |  |
| inlinestatic

Definition at line 244 of file btSoftBodyInternals.h.

## ◆ Lerp() [1/2]

static btMatrix3x3 Lerp | ( | const btMatrix3x3 & | a,
|  | const btMatrix3x3 & | b,
|  | btScalar | t
| ) |  |
| inlinestatic

Definition at line 249 of file btSoftBodyInternals.h.

## ◆ Lerp() [2/2]

template<typename T >

static T Lerp | ( | const T & | a,
|  | const T & | b,
|  | btScalar | t
| ) |  |
| inlinestatic

Definition at line 238 of file btSoftBodyInternals.h.

## ◆ lineIntersectsTriangle()

static bool lineIntersectsTriangle | ( | const btVector3 & | rayStart,
|  | const btVector3 & | rayEnd,
|  | const btVector3 & | p1,
|  | const btVector3 & | p2,
|  | const btVector3 & | p3,
|  | btVector3 & | sect,
|  | btVector3 & | normal
| ) |  |
| inlinestatic

Definition at line 540 of file btSoftBodyInternals.h.

## ◆ MassMatrix()

static btMatrix3x3 MassMatrix | ( | btScalar | im,
|  | const btMatrix3x3 & | iwi,
|  | const btVector3 & | r
| ) |  |
| inlinestatic

Definition at line 409 of file btSoftBodyInternals.h.

## ◆ MatchEdge()

static int MatchEdge | ( | const btSoftBody::Node * | a,
|  | const btSoftBody::Node * | b,
|  | const btSoftBody::Node * | ma,
|  | const btSoftBody::Node * | mb
| ) |  |
| inlinestatic

Definition at line 724 of file btSoftBodyInternals.h.

## ◆ Mul()

static btMatrix3x3 Mul | ( | const btMatrix3x3 & | a,
|  | btScalar | b
| ) |  |
| inlinestatic

Definition at line 394 of file btSoftBodyInternals.h.

## ◆ NormalizeAny()

static btVector3 NormalizeAny | ( | const btVector3 & | v | ) |
| inlinestatic

Definition at line 654 of file btSoftBodyInternals.h.

## ◆ Orthogonalize()

static void Orthogonalize | ( | btMatrix3x3 & | m | ) |
| inlinestatic

Definition at line 402 of file btSoftBodyInternals.h.

## ◆ OuterProduct()

static btMatrix3x3 OuterProduct | ( | const btScalar * | v1,
|  | const btScalar * | v2,
|  | const btScalar * | v3,
|  | const btScalar * | u1,
|  | const btScalar * | u2,
|  | const btScalar * | u3,
|  | int | ndof
| ) |  |
| inlinestatic

Definition at line 355 of file btSoftBodyInternals.h.

## ◆ PolarDecompose()

static int PolarDecompose | ( | const btMatrix3x3 & | m,
|  | btMatrix3x3 & | q,
|  | btMatrix3x3 & | s
| ) |  |
| inlinestatic

Definition at line 812 of file btSoftBodyInternals.h.

## ◆ ProjectOnAxis()

static btVector3 ProjectOnAxis | ( | const btVector3 & | v,
|  | const btVector3 & | a
| ) |  |
| inlinestatic

Definition at line 440 of file btSoftBodyInternals.h.

## ◆ ProjectOnPlane()

static btVector3 ProjectOnPlane | ( | const btVector3 & | v,
|  | const btVector3 & | a
| ) |  |
| inlinestatic

Definition at line 446 of file btSoftBodyInternals.h.

## ◆ ProjectOrigin() [1/2]

static void ProjectOrigin | ( | const btVector3 & | a,
|  | const btVector3 & | b,
|  | btVector3 & | prj,
|  | btScalar & | sqd
| ) |  |
| inlinestatic

Definition at line 453 of file btSoftBodyInternals.h.

## ◆ ProjectOrigin() [2/2]

static void ProjectOrigin | ( | const btVector3 & | a,
|  | const btVector3 & | b,
|  | const btVector3 & | c,
|  | btVector3 & | prj,
|  | btScalar & | sqd
| ) |  |
| inlinestatic

Definition at line 473 of file btSoftBodyInternals.h.

## ◆ rayIntersectsTriangle()

static bool rayIntersectsTriangle | ( | const btVector3 & | origin,
|  | const btVector3 & | dir,
|  | const btVector3 & | v0,
|  | const btVector3 & | v1,
|  | const btVector3 & | v2,
|  | btScalar & | t
| ) |  |
| inlinestatic

Definition at line 507 of file btSoftBodyInternals.h.

## ◆ SameSign()

template<typename T >

static bool SameSign | ( | const T & | x,
|  | const T & | y
| ) |  |
| inlinestatic

Definition at line 294 of file btSoftBodyInternals.h.

## ◆ ScaleAlongAxis()

static btMatrix3x3 ScaleAlongAxis | ( | const btVector3 & | a,
|  | btScalar | s
| ) |  |
| inlinestatic

Definition at line 305 of file btSoftBodyInternals.h.

## ◆ Sign()

template<typename T >

static T Sign | ( | const T & | x | ) |
| inlinestatic

Definition at line 288 of file btSoftBodyInternals.h.

## ◆ Sq()

template<typename T >

static T Sq | ( | const T & | x | ) |
| inlinestatic

Definition at line 276 of file btSoftBodyInternals.h.

## ◆ Sub()

static btMatrix3x3 Sub | ( | const btMatrix3x3 & | a,
|  | const btMatrix3x3 & | b
| ) |  |
| inlinestatic

Definition at line 386 of file btSoftBodyInternals.h.

## ◆ VolumeOf() [1/2]

static btDbvtVolume VolumeOf | ( | const btSoftBody::Face & | f,
|  | btScalar | margin
| ) |  |
| inlinestatic

Definition at line 664 of file btSoftBodyInternals.h.

## ◆ VolumeOf() [2/2]

static btScalar VolumeOf | ( | const btVector3 & | x0,
|  | const btVector3 & | x1,
|  | const btVector3 & | x2,
|  | const btVector3 & | x3
| ) |  |
| inlinestatic

Definition at line 694 of file btSoftBodyInternals.h.

## ◆ ZeroInitialize()

template<typename T >

static void ZeroInitialize | ( | T & | value | ) |
| inlinestatic

Definition at line 220 of file btSoftBodyInternals.h.