/** * Used to create a new instance of the node. This routine is called * by <code>cloneTree</code> to duplicate the current node. * @param forceDuplicate when set to <code>true</code>, causes the * <code>duplicateOnCloneTree</code> flag to be ignored. When * <code>false</code>, the value of each node's * <code>duplicateOnCloneTree</code> variable determines whether * NodeComponent data is duplicated or copied. * * @see Node#cloneTree * @see Node#cloneNode * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ @Override public Node cloneNode(boolean forceDuplicate) { RotationInterpolator ri = new RotationInterpolator(); ri.duplicateNode(this, forceDuplicate); return ri; }
/** * Copies all RotationInterpolator information from * <code>originalNode</code> into * the current node. This method is called from the * <code>cloneNode</code> method which is, in turn, called by the * <code>cloneTree</code> method.<P> * * @param originalNode the original node to duplicate. * @param forceDuplicate when set to <code>true</code>, causes the * <code>duplicateOnCloneTree</code> flag to be ignored. When * <code>false</code>, the value of each node's * <code>duplicateOnCloneTree</code> variable determines whether * NodeComponent data is duplicated or copied. * * @exception RestrictedAccessException if this object is part of a live * or compiled scenegraph. * * @see Node#duplicateNode * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ @Override void duplicateAttributes(Node originalNode, boolean forceDuplicate) { super.duplicateAttributes(originalNode, forceDuplicate); RotationInterpolator ri = (RotationInterpolator) originalNode; setMinimumAngle(ri.getMinimumAngle()); setMaximumAngle(ri.getMaximumAngle()); }
/** * @deprecated As of Java 3D version 1.3, replaced by * <code>TransformInterpolator.setTransformAxis(Transform3D)</code> */ public void setAxisOfRotation(Transform3D axisOfRotation) { setTransformAxis(axisOfRotation); }
@Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); RotationInterpolator interp = (RotationInterpolator)node; interp.setMinimumAngle( in.readFloat() ); interp.setMaximumAngle( in.readFloat() ); }
@Override public void writeObject( DataOutput out ) throws IOException { super.writeObject( out ); RotationInterpolator interp = (RotationInterpolator)node; out.writeFloat( interp.getMinimumAngle() ); out.writeFloat( interp.getMaximumAngle() ); }
rotpol.setTransformAxis(centerXform); rotpol.setSchedulingBounds(bounds); rotpol.setEnable(false); bg.addChild(rotpol); animationTG.addChild(bg);
Alpha rotationAlpha = new Alpha(-1, 4000); RotationInterpolator rotator = new RotationInterpolator( rotationAlpha, objSpin, yAxis, 0.0f, (float) Math.PI*2.0f); rotator.setSchedulingBounds(bounds); objSpin.addChild(rotator);
RotationInterpolator rotationInterpolator = new RotationInterpolator(rotationAlpha, rotationTransformGroup); rotationInterpolator.setSchedulingBounds(boundingSphere); rotationTransformGroup.addChild(rotationInterpolator); return rotationTransformGroup; RotationInterpolator orbitInterpolator = new RotationInterpolator(orbitAlpha, orbitTransformGroup); orbitInterpolator.setSchedulingBounds(boundingSphere); orbitTransformGroup.addChild(orbitInterpolator); return orbitTransformGroup;
@Override protected org.scijava.java3d.SceneGraphObject createNode() { return new RotationInterpolator( null, null ); } }
/** * Starts animating the universe. */ public void startAnimation() { animationTG.getTransform(animationXform); updateRotationAxisAndCenter(); rotpol.setTransformAxis(centerXform); rotpol.setEnable(true); animation.resume(); fireTransformationStarted(); }
/** * @deprecated As of Java 3D version 1.3, replaced by * <code>TransformInterpolator.getTransformAxis()</code> */ public Transform3D getAxisOfRotation() { return getTransformAxis(); }
new RotationInterpolator(rotationAlpha, rotationTransformGroup, new Transform3D(), 0.0f, angle); rotationInterpolator.setSchedulingBounds(boundingSphere); rotationTransformGroup.addChild(rotationInterpolator); return rotationTransformGroup;