17 template <
int N,
typename Real>
65 template <
int N,
typename Real>
70 template <
int N,
typename Real>
72 int numSprings, Real step)
81 template <
int N,
typename Real>
inline 84 return static_cast<int>(
mSpring.size());
87 template <
int N,
typename Real>
95 template <
int N,
typename Real>
inline 102 template <
int N,
typename Real>
109 template <
int N,
typename Real>
128 diff = position[spring.
particle0] - position[i];
132 diff = position[spring.
particle1] - position[i];
137 acceleration += this->
mInvMass[i] * force;
int GetNumSprings() const
void SetSpring(int index, Spring const &spring)
Spring const & GetSpring(int index) const
virtual Vector< N, Real > Acceleration(int i, Real time, std::vector< Vector< N, Real >> const &position, std::vector< Vector< N, Real >> const &velocity)
virtual ~MassSpringArbitrary()
std::vector< Spring > mSpring
MassSpringArbitrary(int numParticles, int numSprings, Real step)
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
std::vector< Real > mInvMass
std::vector< std::set< int > > mAdjacent
virtual Vector< N, Real > ExternalAcceleration(int i, Real time, std::vector< Vector< N, Real >> const &position, std::vector< Vector< N, Real >> const &velocity)