Class PositionBasedCosseratRods

Class Documentation

class PositionBasedCosseratRods

Public Static Functions

static bool solve_StretchShearConstraint(const Vector3r &p0, Real invMass0, const Vector3r &p1, Real invMass1, const Quaternionr &q0, Real invMassq0, const Vector3r &stretchingAndShearingKs, const Real restLength, Vector3r &corr0, Vector3r &corr1, Quaternionr &corrq0)

Determine the position and orientation corrections for the stretch and shear constraint constraint (eq. 37 in the paper).

Parameters
  • p0 – position of first particle

  • invMass0 – inverse mass of first particle

  • p1 – position of second particle

  • invMass1 – inverse mass of second particle

  • q0 – Quaternionr at the center of the edge

  • invMassq0 – inverse mass of the quaternion

  • stretchingAndShearingKs – stiffness coefficients for stretching and shearing

  • restLength – rest edge length

  • corr0 – position correction of first particle

  • corr1 – position correction of second particle

  • corrq0 – orientation correction of quaternion

static bool solve_BendTwistConstraint(const Quaternionr &q0, Real invMassq0, const Quaternionr &q1, Real invMassq1, const Vector3r &bendingAndTwistingKs, const Quaternionr &restDarbouxVector, Quaternionr &corrq0, Quaternionr &corrq1)

Determine the position corrections for the bending and torsion constraint constraint (eq. 40 in the paper).

Parameters
  • q0 – first quaternion

  • invMassq0 – inverse mass of the first quaternion

  • q1 – second quaternion

  • invMassq1 – inverse Mass of the second quaternion

  • bendingAndTwistingKs – stiffness coefficients for stretching and shearing

  • restDarbouxVector – rest Darboux vector

  • corrq0 – position correction of first particle

  • corrq1 – position correction of second particle