case NAV_MODE_IGNORE:
case NAV_MODE_NEWXYZ:
// must just be (not so!) simple navigation
// navigation center will initially move
// but we center it by moving the rotation center instead
Point3f pt1 = new Point3f();
matrixTransform.transform(navigationCenter, pt1);
float z = pt1.z;
matrixTransform.transform(fixedRotationCenter, pt1);
modelCenterOffset = referencePlaneOffset + (pt1.z - z);
calcCameraFactors();
calcTransformMatrix();
break;
case NAV_MODE_NEWZ:
// just untransform the offset to get the new 3D navigation center
navigationOffset.z = referencePlaneOffset;
// System.out.println("nav_mode_newz " + navigationOffset);
unTransformPoint(navigationOffset, navigationCenter);
break;
}
matrixTransform.transform(navigationCenter, navigationShiftXY);
if (viewer.getNavigationPeriodic()) {
// TODO
// but if periodic, then the navigationCenter may have to be moved back a
// notch
Point3f pt = new Point3f(navigationCenter);
viewer.toUnitCell(navigationCenter, null);
// presuming here that pointT is still a molecular point??
if (pt.distance(navigationCenter) > 0.01) {
matrixTransform.transform(navigationCenter, pt);
float dz = navigationShiftXY.z - pt.z;
// the new navigation center determines the navigationZOffset
modelCenterOffset += dz;
calcCameraFactors();