highfidelity/hifi — pull request #3117 by AndrewMeadows (2014-07-03 16:27:06+00:00)
Title: apply joint constraints during IK

Adding AngularConstraint base class and variants for enforcing angular constraints on elbows and wrists:

HingeConstraint is used whenever rotation is limited to a single axis, which is often the case for the elbow.

ConeRollerConstraint is a conical swivel that has limited roll and is used for the hands. The angle of the cone (from central axis to outside surface) is the average of the pitch and yaw ranges.

Also added AngularConstraint::softClamp() which tries to split the difference between the targetRotation and the corresponding hard clamped position.

Re-enabled the gravitational term to the IK algorithm because some models have default poses that don't look good when mixed with naive IK.