NewtonUserJointSetRowSpringDamperAcceleration

From Newton Wiki
Jump to: navigation, search

NewtonUserJointSetRowSpringDamperAcceleration

void NewtonUserJointSetRowSpringDamperAcceleration( const NewtonJoint* joint, dFloat springK, dFloat springD)

Usage

Calculates the row acceleration to satisfy the specified the spring damper system.

Parameters

  • const NewtonJoint *joint - pointer to the joint.
  • dFloat springK - desired spring stiffness, it must be a positive value.
  • dFloat springD - desired spring damper, it must be a positive value.
  • Remark
  • This function will override the default acceleration values set after a call to NewtonUserJointAddLinearRow or NewtonUserJointAddAngularRow. friction value is context sensitive, if for linear constraint acceleration is a linear acceleration, for angular constraint acceleration is an angular acceleration.
  • Remark
  • the acceleration calculated by this function represent the mass, spring system of the form
  • a = -ks * x - kd * v.
  • Remark
  • for this function to take place the joint stiffness must be set to a values lower than 1.0

See also

NewtonUserJointSetRowAcceleration NewtonUserJointSetRowStiffness