@Override
public void computeTransform(RigidBodyTransform currXform)
{
update();
CameraMountInterface cameraMount = getCameraMount();
if (isMounted() && (cameraMount != null))
{
cameraMount.getTransformToCamera(currXform);
return;
}
positionOffset.set(getCamX(), getCamY(), getCamZ());
xAxis.set(getFixX(), getFixY(), getFixZ());
fixPointNode.translateTo(getFixX(), getFixY(), getFixZ());
xAxis.sub(positionOffset);
xAxis.normalize();
zAxis.set(0.0, 0.0, 1.0);
yAxis.cross(zAxis, xAxis);
zAxis.cross(xAxis, yAxis);
rotationMatrix.setColumn(0, xAxis);
rotationMatrix.setColumn(1, yAxis);
rotationMatrix.setColumn(2, zAxis);
currXform.setRotationAndZeroTranslation(rotationMatrix);
currXform.setTranslation(positionOffset);
currXform.normalizeRotationPart();
}