camera3d.action
Class ScalingAction
java.lang.Object
camera3d.action.VcAction
camera3d.action.VcObjectChangeAction
camera3d.action.TransformAction
camera3d.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.