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;
64 for (
int i = 0; i < numDeformableBodies; ++i)
69 if (psb != deformableBodies[i])
77 residualSquare =
btMax(residualSquare, localResidualSquare);
83 residualSquare =
btMax(residualSquare, localResidualSquare);
87 return residualSquare;
143 if (contact.
m_c2 == 0)
161 if (projectionDirs.
size() >= dim)
167 else if (projectionDirs.
size() == 2)
174 x[i] -=
x[i].dot(dir0) * dir0;
178 free_dir.normalize();
179 x[i] =
x[i].dot(free_dir) * free_dir;
186 x[i] -=
x[i].dot(dir0) * dir0;
191 for (
int i = 0; i < m_projections.size(); ++i)
193 p += (m_projections[i].dot(
x) * m_projections[i]);
205 BT_PROFILE(
"btDeformableContactProjection::setProjection");
213 if (!psb->isActive())
228 for (
int k = 0; k < 3; ++k)
245 for (
int k = 0; k < 3; ++k)
266 for (
int k = 0; k < 3; ++k)
293 for (
int k = 0; k < 3; ++k)
298 for (
int k = 0; k < 3; ++k)
301 int index =
node->index;
311 for (
int l = 0;
l < 3; ++
l)
343 if (!psb->isActive())
403 for (
int k = 0; k < 3; ++k)
405 face->
m_n[k]->m_penetration =
btMax(face->
m_n[k]->m_penetration, penetration);
409 for (
int l = 0;
l < 3; ++
l)
412 for (
int k = 0; k < 3; ++k)
420 m_projections.push_back(rv);
426 for (
int k = 0; k < 3; ++k)
432 m_projections.push_back(rv);
438 m_projections = mgs.
m_out;
465 if (!psb->isActive())
537 for (
int k = 0; k < 3; ++k)
573 int index =
node->index;
581 for (
int k = 0; k < 3; ++k)
586 int index =
node->index;
598 int index =
node->index;
601 for (
int k = 0; k < 3; ++k)
606 int index =
node->index;
625 for (
int i = 0; i <
N; ++i)
636 m_projections.clear();
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint int const btContactSolverInfo & infoGlobal
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
SIMD_FORCE_INLINE btVector3 btCross(const btVector3 &v1, const btVector3 &v2)
Return the cross product of two vectors.
SIMD_FORCE_INLINE void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
SIMD_FORCE_INLINE void resize(int newsize, const T &fillData=T())
SIMD_FORCE_INLINE void push_back(const T &_Val)
void insert(const Key &key, const Value &value)
Key getKeyAtIndex(int index)
const Value * find(const Key &key) const
const Value * getAtIndex(int index) const
btAlignedObjectArray< TV > m_out
btAlignedObjectArray< int > m_indices
btAlignedObjectArray< btVector3 > m_vecs
btAlignedObjectArray< DeformableFaceRigidContact > m_faceRigidContacts
btAlignedObjectArray< DeformableNodeRigidAnchor > m_deformableAnchors
btAlignedObjectArray< DeformableNodeRigidContact > m_nodeRigidContacts
ccl_gpu_kernel_postfix int ccl_global int * indices
const btCollisionObject * m_colObj