rigidBodyDynamics: Removed quaternion counter and index: 'nw', 'wIndex'

Replaced with 'unitQuaterion()' virtual function to indicate if the
joint uses a unit quaternion to represent rotation.
This commit is contained in:
Henry Weller
2016-04-12 22:17:52 +01:00
parent 315a1baad3
commit a0170df6c1
11 changed files with 32 additions and 68 deletions

View File

@ -61,7 +61,7 @@ int main(int argc, char *argv[])
Field<spatialVector> fx(sphericalJoint.nBodies(), Zero);
// Set the angle of the pendulum to 0.3rad
sphericalJoint.joints()[1]
sphericalJoint.joints()[1].unitQuaternion
(
quaternion(quaternion::ZYX, vector(0.3, 0, 0)),
sphericalJoint.state().q()
@ -87,7 +87,7 @@ int main(int argc, char *argv[])
// using 'gnuplot sphericalJoint.gnuplot'
omegaFile
<< t << " "
<< sphericalJoint.joints()[1]
<< sphericalJoint.joints()[1].unitQuaternion
(
sphericalJoint.state().q()
).eulerAngles(quaternion::ZYX).x()