camera3d.action
Class ScalingAction

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

public class ScalingAction
extends TransformAction

Action for changing the scale of one VcObject.

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
ScalingAction(VcObject v, TransformMode mode)
          Creates scaling action given VcObject to act upon and transformation type.
 
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 ScalingAction.
 void setScalingValues(double x, double y, double z)
          Sets new scale values in all three axis.
 
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

ScalingAction

public ScalingAction(VcObject v,
                     TransformMode mode)
Creates scaling action given VcObject to act upon and transformation type.

Parameters:
v - VcObject affected by action.
mode - can be either absolute or relative.
Method Detail

setScalingValues

public void setScalingValues(double x,
                             double y,
                             double z)
Sets new scale values in all three axis.


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 ScalingAction. When optimization is performed only this action should be executed, and not the inputAction. return true if optimization was performed, false otherwise.

Specified by:
optimize in interface camera3d.action.OptimizableAction
Specified by:
optimize in class TransformAction


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