camera3d.action
Class RotationAction

java.lang.Object
  extended bycamera3d.action.VcAction
      extended bycamera3d.action.VcObjectChangeAction
          extended bycamera3d.action.TransformAction
              extended bycamera3d.action.RotationAction
All Implemented Interfaces:
camera3d.action.OptimizableAction

public class RotationAction
extends TransformAction

Action for rotating VcObjects.

Version:
1.0
Author:
Fábio Roberto de Miranda

Field Summary
 
Fields inherited from class camera3d.action.VcAction
MULTIPLE_OBJECT_ACTION, SINGLE_OBJECT_ACTION
 
Constructor Summary
RotationAction(VcObject v, TransformMode mode)
           
 
Method Summary
 void doAction(ActionExecutor executor)
          Performs the action.
 boolean optimize(VcAction inputAction)
          Tries to combine the effect of this action and of inputAction into one single action.
 void setAngles(double x, double y, double z)
           
 
Methods inherited from class camera3d.action.TransformAction
canOptimize, getTransformMode, getVcObject, setTransformMode, setVcObject
 
Methods inherited from class camera3d.action.VcAction
debugln, getMultiplicityType, isUndoable, setMultiplicityType, undoAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotationAction

public RotationAction(VcObject v,
                      TransformMode mode)
Method Detail

setAngles

public void setAngles(double x,
                      double y,
                      double z)

doAction

public void doAction(ActionExecutor executor)
Description copied from class: VcAction
Performs the action.

Specified by:
doAction in class VcAction
Parameters:
executor - provides any resource necessary for the action execution, such as references to other objects.

optimize

public boolean optimize(VcAction inputAction)
Tries to combine the effect of this action and of inputAction into one single action. If that is possible (as signaled by the return value), only this action should be executed, and not inputAction.

Specified by:
optimize in interface camera3d.action.OptimizableAction
Specified by:
optimize in class TransformAction
Returns:
true if optimization has been performed, false otherwise


Copyright © 2001-2003 F.R. Miranda, C.S. Santos, J.E. Kogler Jr.. All Rights Reserved.