Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
23 for (
int i = 0; i < numDeformableBodies; ++i)
28 if (psb != deformableBodies[i])
36 residualSquare =
btMax(residualSquare, localResidualSquare);
42 residualSquare =
btMax(residualSquare, localResidualSquare);
48 residualSquare =
btMax(residualSquare, localResidualSquare);
54 residualSquare =
btMax(residualSquare, localResidualSquare);
58 return residualSquare;
90 residualSquare =
btMax(residualSquare, localResidualSquare);
97 residualSquare =
btMax(residualSquare, localResidualSquare);
104 residualSquare =
btMax(residualSquare, localResidualSquare);
108 return residualSquare;
172 if (contact.
m_c2 == 0)
213 if (projectionDirs.
size() >= dim)
219 else if (projectionDirs.
size() == 2)
226 x[i] -= x[i].dot(dir0) * dir0;
227 x[i] -= x[i].dot(dir1) * dir1;
232 x[i] = x[i].dot(free_dir) * free_dir;
239 x[i] -= x[i].dot(dir0) * dir0;
267 for (
int k = 0; k < 3; ++k)
283 for (
int k = 0; k < 3; ++k)
301 for (
int k = 0; k < 3; ++k)
325 for (
int k = 0; k < 3; ++k)
328 int index = node->
index;
338 for (
int k = 0; k < 3; ++k)
363 for (
int k = 0; k < 3; ++k)
366 int index = node->
index;
376 for (
int k = 0; k < 3; ++k)
399 int index = node->
index;
409 for (
int k = 0; k < 3; ++k)
444 int index = node->
index;
445 f[index] += constraint.
getDv(node)* (1./node->
m_im);
452 for (
int k = 0; k < 3; ++k)
457 int index = node->
index;
458 f[index] += constraint.
getDv(node)* (1./node->
m_im);
469 int index = node->
index;
470 f[index] += constraint.
getDv(node)* (1./node->
m_im);
472 for (
int k = 0; k < 3; ++k)
477 int index = node->
index;
478 f[index] += constraint.
getDv(node)* (1./node->
m_im);
497 for (
int i = 0 ; i < N; ++i)
btCollisionObject can be used to manage collision detection objects.
btAlignedObjectArray< DeformableFaceNodeContact > m_faceNodeContacts
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const Value * getAtIndex(int index) const
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
btScalar safeNorm() const
Return the norm (length) of the vector.
btVector3 btCross(const btVector3 &v1, const btVector3 &v2)
Return the cross product of two vectors.
const T & btMax(const T &a, const T &b)
btTransform & getWorldTransform()
btAlignedObjectArray< DeformableFaceRigidContact > m_faceRigidContacts
const btCollisionObject * m_colObj
void resize(int newsize, const T &fillData=T())
btVector3 can be used to represent 3D points and vectors.
const Value * find(const Key &key) const
btScalar btDot(const btVector3 &v1, const btVector3 &v2)
Return the dot product between two vectors.
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
Key getKeyAtIndex(int index)
void insert(const Key &key, const Value &value)
btAlignedObjectArray< DeformableNodeRigidContact > m_nodeRigidContacts
btAlignedObjectArray< DeformableNodeRigidAnchor > m_deformableAnchors
void push_back(const T &_Val)
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
int size() const
return the number of elements in the array