|
void | initConstraint (const Vec3d &p0, const Vec3d &p1, const PbdParticleId &pIdx0, const PbdParticleId &pIdx1, const double k=1e5) |
| Initializes the inflatable distance constraint.
|
|
void | projectConstraint (PbdState &bodies, const double dt, const SolverType &type) override |
| Apply diffusion and update positions.
|
|
void | setRestLength (const double restLength) |
|
const double | getRestLength () const |
|
void | setInitRestLength (const double initRestLength) |
|
const double | getInitRestLength () const |
|
void | resetRestLength () |
| Reset constraint rest measurement.
|
|
void | resetStiffness () |
|
bool | isInflated () const |
|
void | setInflated () |
|
void | initConstraint (const Vec3d &p0, const Vec3d &p1, const PbdParticleId &pIdx0, const PbdParticleId &pIdx1, const double k=1e5) |
| Initialize the constraint with resting length as the length between the two points.
|
|
void | initConstraint (const double restLength, const PbdParticleId &pIdx0, const PbdParticleId &pIdx1, const double k=1e5) |
| Initialize the constraint with provided resting length.
|
|
bool | computeValueAndGradient (PbdState &bodies, double &c, std::vector< Vec3d > &dcdx) override |
| Compute value and gradient of the constraint. More...
|
|
double | getRestValue () const |
| Return the rest configuration for the constraint.
|
|
virtual const std::string | getTypeName () const =0 |
|
std::vector< PbdParticleId > & | getParticles () |
| Get the vertex indices of the constraint.
|
|
bool | getCorrectVelocity () const |
| Get/Set whether velocity should be corrected for this constraint.
|
|
void | setCorrectVelocity (const bool correctVelocity) |
|
const Vec3d & | getGradient (const int i) const |
| Get gradient given the particle index in constraint.
|
|
double | getForce (const double dt) const |
| Get the force magnitude, valid after solving lambda Only valid with xpbd.
|
|
double | getConstraintC () const |
| Get constraint value C (how much the constraint is violated)
|
|
double | getLambda () const |
| Get constraint value C (how much the constraint is violated)
|
|
void | zeroOutLambda () |
| Zero's out the lagrange multplier before integration only used for xpbd, must be called before solving.
|
|
virtual void | correctVelocity (PbdState &bodies, const double dt) |
| Correct velocities according to friction and restitution Corrects according to the gradient direction.
|
|
double | computeGeneralizedInvMass (const PbdState &bodies, const size_t particleIndex) const |
| Compute generalized inverse mass of the particle. Note perf sensitive function. It has been intentionally inlined. More...
|
|
double | computeGeneralizedInvMass (const PbdState &bodies, const size_t particleIndex, const Vec3d &r) const |
| Compute generalized inverse mass of the particle. More...
|
|
double | getRestitution () const |
| Get/Set restitution.
|
|
void | setRestitution (const double restitution) |
|
double | getFriction () const |
| Get/Set friction.
|
|
void | setFriction (const double friction) |
|
double | getStiffness () const |
| Get/Set the stiffness.
|
|
void | setStiffness (const double stiffness) |
|
double | getCompliance () const |
| Get/Set the compliance This function is also provided in case users need 0 compliance.
|
|
void | setCompliance (const double compliance) |
|