The VTC takes an attachment point where the input connects to the tool.
Often the input position provided by a haptic device should
correspond to the tip of the tool, but physics does all torques about
the mass center, so we need to convert somewhere.

The forces and torques experienced about the mass center of the physical
tool should be equal to those set in addExternalForce and
addExternalTorque for application to the mass center of the simulated
tool.

The device scaffold could do the conversion by adjusting the kinematic
calculations, but then each time the mesh representing the tool changes
we would need to update the device.  Similarly, a device filter could do
the calculations but then it needs to know about the mesh shape.
The VTC already knows about all the pieces and can do the calculations.

The stapler in StaplingExample should now rotate about the tip as the
MultiAxisDevice is rotated, but collisions should cause rotations about
the mass center.
Renames VirtualToolCoupler's attachment to attachmentPoint.
Renames local variables for clarity, in VirtualToolCoupler::update.
The variables are related to the attachment point.
Renames inputMassCenter to inputPosition to match with objectPosition,
both are world frame locations of the mass center calculated with
different poses.
Renames orientedAttachment to leverArm, because it is only used to
calculate torque from force at a distance.
VirtualToolCoupler's attachment point is now a local coordinate.
Previously it was the vector from the mass center to the attachment
point. This approach is simpler because for a mesh shape the user can
use a mesh visualizing program to find the local coordinate they need
for the attachment point, without worrying about where OSS may
calculate the mass center to be.
Replaces setSubMatrix with Matrix.block in VirtualToolCoupler.
Also a bugfix in which block dTorqueDposition and dTorqueDvelocity
belong.  The equation for the springJacobian is:
[dForce ] = J * [dPosition   ]
[dTorque]       [dOrientation]
So dTorqueDposition goes in the bottom left block.
Use linear() to rotate vectors, instead of rotation(), in VTC.
Calculate the force at the VTCs attachment point

Calculate the force of the vtc at the attachment point and add the
contribution of the force at a distance to the torque. Before, the
application point was only being considered for the output force, this
makes the force and torque being sent back to the device is equal and
opposite of the force/torque being applied to the physics
representation.

Also, changed the attachment point to an optional parameter similar to
the stiffness and damping terms. So, if the attachment point is not
specified it is set to the center of mass of the physics representation
instead of 0,0,0.

Finally, the output force and torque staling is removed from the vtc.
These parameters are device dependant, and should be part of a device
filter.
Bugfix, must wakeUp VirtualToolCoupler in unit tests.
Reorders lines in VirtualToolCouplerTest for stricter checking.
Since the test uses the same number for multiple setters/getters,
this change makes sure that a setter is not accidentally setting
a different variable.
Merge branch 'master' into feature/vtc-attachment
Moves RigidRepresentation pose initialization to doInitialize.

Now that the PoseComponent (if any) is created before the Representation
initializes, we can set the RigidRepresentation's pose in doInitialize
instead of doWakeUp.

The Representation::getPose code changed from getPoseComponent->getPose
to the equivalent getSceneElement->getPose because
Component::getPoseComponent asserts before initialization.
Adds more checks to VirtualToolCoupler unit tests.

Many VTC unit tests were not testing the initial position/orientation,
and the RigidRepresentations were not being initialized.  So the
rigid bodies were actually starting at and ending at the Identity pose,
and the VTC was not applying any forces or torques.
A VirtualToolCoupler with attachment point can disable inertial torques.

We need to handle the possibility that the input device's pose does not
correspond to the mass center, but some other point like the tip
of the tool.  The attachment point handles that possibility but also
adds torques that simulate inertia. Those torques are unwanted if the
input device has a replica of the tool for the handle so there is
already non-simulated inertia.
Merge branch 'master' into feature/vtc-attachment
Removes negation for if-test in VirtualToolCoupler.
Replace references to TriangleMeshBase<Empty, Empty, Empty>

Remove extra typedefs and use of MeshElement in unit tests
Merge branch 'feature/vtc-attachment' into 'master'

VTC attachment point.

Merged-on: https://www.assembla.com/code/OpenSurgSim/git/merge_requests/962453
Merge branch 'fix/remove-triple-empty-mesh' into 'master'

Remove TriangleMeshBase<EmptyData... in favor of TriangleMeshPlain

+1: haizhouW, Ryan Beasley, Gughan Sathyaseelan

Merged-on: https://www.assembla.com/code/OpenSurgSim/git/merge_requests/1025944