camera3d.action
Class TransformAction

java.lang.Object
  extended bycamera3d.action.VcAction
      extended bycamera3d.action.VcObjectChangeAction
          extended bycamera3d.action.TransformAction
All Implemented Interfaces:
camera3d.action.OptimizableAction
Direct Known Subclasses:
RotationAction, ScalingAction, TranslationAction

public abstract class TransformAction
extends VcObjectChangeAction
implements camera3d.action.OptimizableAction

Abstract superclass to all actions that affect a VcObject's transform.

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
TransformAction()
           
TransformAction(VcObject v, TransformMode mode)
           
 
Method Summary
 boolean canOptimize(VcAction inputAction)
          Returns a flag indicating whether this action and inputAction can be merged into one single action with equivalent effects.
 TransformMode getTransformMode()
           
 VcObject getVcObject()
           
abstract  boolean optimize(VcAction action)
          Performs optimization.
 void setTransformMode(TransformMode mode)
           
 void setVcObject(VcObject v)
           
 
Methods inherited from class camera3d.action.VcAction
debugln, doAction, getMultiplicityType, isUndoable, setMultiplicityType, undoAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformAction

public TransformAction(VcObject v,
                       TransformMode mode)

TransformAction

public TransformAction()
Method Detail

canOptimize

public boolean canOptimize(VcAction inputAction)
Returns a flag indicating whether this action and inputAction can be merged into one single action with equivalent effects. That happens when the two actions have the same class and affect the same object.

Specified by:
canOptimize in interface camera3d.action.OptimizableAction
Parameters:
inputAction -
Returns:
true if the actions can be optimized, false otherwise.

optimize

public abstract boolean optimize(VcAction action)
Description copied from interface: camera3d.action.OptimizableAction
Performs optimization.

Specified by:
optimize in interface camera3d.action.OptimizableAction
Parameters:
action - VcAction to be eliminated
Returns:
true if the VcAction given as input was eliminated, false otherwise.

setVcObject

public void setVcObject(VcObject v)

getVcObject

public VcObject getVcObject()

setTransformMode

public void setTransformMode(TransformMode mode)

getTransformMode

public TransformMode getTransformMode()


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