/** * Implements the BehaviorCallback interface of the behavior objects used by * this universe. This method is invoked to inform about transformation * changes. This method simply calls fireTransformationUpdated(). */ @Override public void transformChanged(final int type, final Transform3D xf) { fireTransformationUpdated(); }
/** Set the transforms for zoom, pan, and rotation. */ public void setGlobalTransform(final GlobalTransform transform) { final MultiTransformGroup group = getViewingPlatform().getMultiTransformGroup(); final int num = group.getNumTransforms(); if (transform.transforms == null || transform.transforms.length != num) throw new RuntimeException( "Internal 3D Viewer error"); for (int i = 0; i < num; i++) group.getTransformGroup(i).setTransform(transform.transforms[i]); waitForNextFrame(); fireTransformationUpdated(); }