16#ifndef BT_BACKWARD_EULER_OBJECTIVE_H
17#define BT_BACKWARD_EULER_OBJECTIVE_H
117 psb->
m_nodes[j].index = node_id;
123 psb->
m_faces[j].m_index = face_id;
145 for (
int i = 0; i < vec.
size(); ++i)
147 extended_vec[i] = vec[i];
149 int offset = vec.
size();
152 extended_vec[offset + i].setZero();
159 for (
int i = 0; i < residual.
size(); ++i)
161 extended_residual[i] = residual[i];
163 int offset = residual.
size();
167 extended_residual[offset + i].setZero();
191 for (
int i = 0; i <
m_lf.
size(); ++i)
194 m_lf[i]->addScaledDampingForceDifferential(-
m_dt, dv, f);
197 for (; counter < f.
size(); ++counter)
199 f[counter] = rhs[counter] - f[counter];
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
void push_back(const T &_Val)
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
btVector3 can be used to represent 3D points and vectors.