Blender V2.61 - r43446
|
#include "btSoftBody.h"
#include "LinearMath/btQuickprof.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
#include <string.h>
Go to the source code of this file.
Classes | |
struct | btSymMatrix< T > |
btSoftBody implementation by Nathanael Presson More... | |
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::CollideVF_SS |
Functions | |
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 | 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) |
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 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 | EvaluateMedium (const btSoftBodyWorldInfo *wfi, const btVector3 &x, btSoftBody::sMedium &medium) |
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) |
static btMatrix3x3 Add | ( | const btMatrix3x3 & | a, |
const btMatrix3x3 & | b | ||
) | [inline, static] |
Definition at line 273 of file btSoftBodyInternals.h.
References i.
Referenced by AngularImpulseMatrix(), ImpulseMatrix(), and PolarDecompose().
static btMatrix3x3 AngularImpulseMatrix | ( | const btMatrix3x3 & | iia, |
const btMatrix3x3 & | iib | ||
) | [inline, static] |
Definition at line 328 of file btSoftBodyInternals.h.
References Add(), and inverse().
Referenced by btSoftBody::AJoint::Prepare().
static void ApplyClampedForce | ( | btSoftBody::Node & | n, |
const btVector3 & | f, | ||
btScalar | dt | ||
) | [inline, static] |
Definition at line 525 of file btSoftBodyInternals.h.
References btSoftBody::Node::m_f, btSoftBody::Node::m_im, btSoftBody::Node::m_v, and ProjectOnAxis().
Referenced by btSoftBody::applyForces().
static btScalar AreaOf | ( | const btVector3 & | x0, |
const btVector3 & | x1, | ||
const btVector3 & | x2 | ||
) | [inline, static] |
Definition at line 482 of file btSoftBodyInternals.h.
References btCross().
Referenced by btSoftBody::appendFace(), btSoftBody::setTotalMass(), and btSoftBody::updateConstants().
static btVector3 BaryCoord | ( | const btVector3 & | a, |
const btVector3 & | b, | ||
const btVector3 & | c, | ||
const btVector3 & | p | ||
) | [inline, static] |
Definition at line 411 of file btSoftBodyInternals.h.
References btCross(), and simple_enum_gen::w.
Referenced by btSoftColliders::CollideVF_SS::Process().
static T BaryEval | ( | const T & | a, |
const T & | b, | ||
const T & | c, | ||
const btVector3 & | coord | ||
) | [inline, static] |
Definition at line 403 of file btSoftBodyInternals.h.
Referenced by btSoftColliders::CollideVF_SS::Process(), and btSoftBody::PSolve_SContacts().
static btVector3 CenterOf | ( | const btSoftBody::Face & | f | ) | [inline, static] |
Definition at line 476 of file btSoftBodyInternals.h.
References btSoftBody::Face::m_n.
static btVector3 Clamp | ( | const btVector3 & | v, |
btScalar | maxlength | ||
) | [inline, static] |
Definition at line 205 of file btSoftBodyInternals.h.
References btSqrt().
Referenced by btSoftBody::LJoint::Prepare().
static T Clamp | ( | const T & | x, |
const T & | l, | ||
const T & | h | ||
) | [inline, static] |
Definition at line 215 of file btSoftBodyInternals.h.
static btScalar ClusterMetric | ( | const btVector3 & | x, |
const btVector3 & | y | ||
) | [inline, static] |
Definition at line 234 of file btSoftBodyInternals.h.
References btFabs(), and simple_enum_gen::d.
Referenced by btSoftBody::generateClusters().
static bool CompGreater | ( | const T & | a, |
const T & | b | ||
) | [inline, static] |
Definition at line 183 of file btSoftBodyInternals.h.
static bool CompLess | ( | const T & | a, |
const T & | b | ||
) | [inline, static] |
Definition at line 179 of file btSoftBodyInternals.h.
static btMatrix3x3 Cross | ( | const btVector3 & | v | ) | [inline, static] |
Definition at line 255 of file btSoftBodyInternals.h.
Referenced by MassMatrix().
static T Cube | ( | const T & | x | ) | [inline, static] |
Definition at line 223 of file btSoftBodyInternals.h.
static btMatrix3x3 Diagonal | ( | btScalar | x | ) | [inline, static] |
Definition at line 264 of file btSoftBodyInternals.h.
Referenced by ImpulseMatrix(), and MassMatrix().
static void EvaluateMedium | ( | const btSoftBodyWorldInfo * | wfi, |
const btVector3 & | x, | ||
btSoftBody::sMedium & | medium | ||
) | [static] |
Definition at line 506 of file btSoftBodyInternals.h.
References btSoftBodyWorldInfo::air_density, btDot(), btSoftBody::sMedium::m_density, btSoftBodyWorldInfo::m_gravity, btSoftBody::sMedium::m_pressure, btSoftBody::sMedium::m_velocity, btSoftBodyWorldInfo::water_density, btSoftBodyWorldInfo::water_normal, and btSoftBodyWorldInfo::water_offset.
Referenced by btSoftBody::applyForces().
static btScalar ImplicitSolve | ( | btSoftBody::ImplicitFn * | fn, |
const btVector3 & | a, | ||
const btVector3 & | b, | ||
const btScalar | accuracy, | ||
const int | maxiterations = 256 |
||
) | [static] |
Definition at line 424 of file btSoftBodyInternals.h.
References btFabs(), btSwap(), btSoftBody::ImplicitFn::Eval(), i, and Lerp().
Referenced by btSoftBody::refine().
static btMatrix3x3 ImpulseMatrix | ( | btScalar | dt, |
btScalar | ima, | ||
btScalar | imb, | ||
const btMatrix3x3 & | iwi, | ||
const btVector3 & | r | ||
) | [inline, static] |
Definition at line 311 of file btSoftBodyInternals.h.
References Add(), Diagonal(), inverse(), and MassMatrix().
Referenced by btSoftColliders::CollideSDF_RS::DoNode(), btSoftBody::LJoint::Prepare(), btSoftBody::solveConstraints(), and btSoftColliders::ClusterBase::SolveContact().
static btMatrix3x3 ImpulseMatrix | ( | btScalar | ima, |
const btMatrix3x3 & | iia, | ||
const btVector3 & | ra, | ||
btScalar | imb, | ||
const btMatrix3x3 & | iib, | ||
const btVector3 & | rb | ||
) | [inline, static] |
Definition at line 321 of file btSoftBodyInternals.h.
References Add(), inverse(), and MassMatrix().
static T InvLerp | ( | const T & | a, |
const T & | b, | ||
btScalar | t | ||
) | [inline, static] |
Definition at line 191 of file btSoftBodyInternals.h.
static T Lerp | ( | const T & | a, |
const T & | b, | ||
btScalar | t | ||
) | [inline, static] |
Definition at line 187 of file btSoftBodyInternals.h.
Referenced by btSoftBody::cutLink(), ImplicitSolve(), Lerp(), btSoftBody::predictMotion(), btSoftBody::refine(), and btSoftBody::updateClusters().
static btMatrix3x3 Lerp | ( | const btMatrix3x3 & | a, |
const btMatrix3x3 & | b, | ||
btScalar | t | ||
) | [inline, static] |
Definition at line 194 of file btSoftBodyInternals.h.
References Lerp().
static btMatrix3x3 MassMatrix | ( | btScalar | im, |
const btMatrix3x3 & | iwi, | ||
const btVector3 & | r | ||
) | [inline, static] |
Definition at line 304 of file btSoftBodyInternals.h.
References Cross(), Diagonal(), and Sub().
Referenced by ImpulseMatrix().
static int MatchEdge | ( | const btSoftBody::Node * | a, |
const btSoftBody::Node * | b, | ||
const btSoftBody::Node * | ma, | ||
const btSoftBody::Node * | mb | ||
) | [inline, static] |
Definition at line 541 of file btSoftBodyInternals.h.
Referenced by btSoftBody::cutLink().
static btMatrix3x3 Mul | ( | const btMatrix3x3 & | a, |
btScalar | b | ||
) | [inline, static] |
Definition at line 289 of file btSoftBodyInternals.h.
References i.
Referenced by PolarDecompose(), and btSoftBody::updatePose().
static btVector3 NormalizeAny | ( | const btVector3 & | v | ) | [inline, static] |
Definition at line 454 of file btSoftBodyInternals.h.
References SIMD_EPSILON.
Referenced by btSoftBody::applyForces(), and btSoftBody::AJoint::Prepare().
static void Orthogonalize | ( | btMatrix3x3 & | m | ) | [inline, static] |
Definition at line 297 of file btSoftBodyInternals.h.
References btCross().
Referenced by PolarDecompose().
static int PolarDecompose | ( | const btMatrix3x3 & | m, |
btMatrix3x3 & | q, | ||
btMatrix3x3 & | s | ||
) | [inline, static] |
Definition at line 615 of file btSoftBodyInternals.h.
References iTaSC::accuracy, Add(), btMatrix3x3::adjoint(), btFuzzyZero(), btMatrix3x3::determinant(), i, length(), Mul(), Orthogonalize(), btMatrix3x3::setIdentity(), Sq(), transpose(), and btMatrix3x3::transpose().
Referenced by btSoftBody::updateClusters(), and btSoftBody::updatePose().
static btVector3 ProjectOnAxis | ( | const btVector3 & | v, |
const btVector3 & | a | ||
) | [inline, static] |
Definition at line 335 of file btSoftBodyInternals.h.
References btDot().
Referenced by ApplyClampedForce(), and ProjectOnPlane().
static btVector3 ProjectOnPlane | ( | const btVector3 & | v, |
const btVector3 & | a | ||
) | [inline, static] |
Definition at line 341 of file btSoftBodyInternals.h.
References ProjectOnAxis().
Referenced by btSoftBody::PSolve_SContacts().
static void ProjectOrigin | ( | const btVector3 & | a, |
const btVector3 & | b, | ||
btVector3 & | prj, | ||
btScalar & | sqd | ||
) | [inline, static] |
Definition at line 348 of file btSoftBodyInternals.h.
References btDot(), simple_enum_gen::d, p, and SIMD_EPSILON.
Referenced by btSoftColliders::CollideVF_SS::Process(), and ProjectOrigin().
static void ProjectOrigin | ( | const btVector3 & | a, |
const btVector3 & | b, | ||
const btVector3 & | c, | ||
btVector3 & | prj, | ||
btScalar & | sqd | ||
) | [inline, static] |
Definition at line 368 of file btSoftBodyInternals.h.
References btCross(), btDot(), btSqrt(), p, ProjectOrigin(), and SIMD_EPSILON.
static bool SameSign | ( | const T & | x, |
const T & | y | ||
) | [inline, static] |
Definition at line 231 of file btSoftBodyInternals.h.
Referenced by btSoftBody::refine().
static btMatrix3x3 ScaleAlongAxis | ( | const btVector3 & | a, |
btScalar | s | ||
) | [inline, static] |
Definition at line 240 of file btSoftBodyInternals.h.
static T Sign | ( | const T & | x | ) | [inline, static] |
static T Sq | ( | const T & | x | ) | [inline, static] |
Definition at line 219 of file btSoftBodyInternals.h.
Referenced by PolarDecompose().
static btMatrix3x3 Sub | ( | const btMatrix3x3 & | a, |
const btMatrix3x3 & | b | ||
) | [inline, static] |
static btScalar VolumeOf | ( | const btVector3 & | x0, |
const btVector3 & | x1, | ||
const btVector3 & | x2, | ||
const btVector3 & | x3 | ||
) | [inline, static] |
Definition at line 494 of file btSoftBodyInternals.h.
static btDbvtVolume VolumeOf | ( | const btSoftBody::Face & | f, |
btScalar | margin | ||
) | [inline, static] |
Definition at line 464 of file btSoftBodyInternals.h.
References btDbvtAabbMm::Expand(), btDbvtAabbMm::FromPoints(), and btSoftBody::Face::m_n.
Referenced by btSoftBody::appendTetra(), btSoftBody::initializeFaceTree(), and btSoftBody::predictMotion().
static void ZeroInitialize | ( | T & | value | ) | [inline, static] |
Definition at line 173 of file btSoftBodyInternals.h.
References T.
Referenced by btSoftBody::appendFace(), btSoftBody::appendLink(), btSoftBody::appendMaterial(), btSoftBody::appendNode(), btSoftBody::appendNote(), btSoftBody::appendTetra(), and btSoftBody::btSoftBody().