16#ifndef BT_BACKWARD_EULER_OBJECTIVE_H
17#define BT_BACKWARD_EULER_OBJECTIVE_H
111 psb->
m_nodes[j].index = node_id;
117 psb->
m_faces[j].m_index = face_id;
139 for (
int i = 0; i < vec.
size(); ++i)
141 extended_vec[i] = vec[i];
143 int offset = vec.
size();
146 extended_vec[offset + i].setZero();
153 for (
int i = 0; i < residual.
size(); ++i)
155 extended_residual[i] = residual[i];
157 int offset = residual.
size();
161 extended_residual[offset + i].setZero();
181 f[counter] = (node.m_im == 0) ?
btVector3(0, 0, 0) : dv[counter] / node.m_im;
185 for (
int i = 0; i <
m_lf.
size(); ++i)
188 m_lf[i]->addScaledDampingForceDifferential(-
m_dt, dv, f);
191 for (; counter < f.
size(); ++counter)
193 f[counter] =
rhs[counter] - f[counter];
void setZero()
Set the matrix to the identity.
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 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)
local_group_size(16, 16) .push_constant(Type b
local_group_size(16, 16) .push_constant(Type rhs