camera3d.action
Class TranslationAction
java.lang.Object
camera3d.action.VcAction
camera3d.action.VcObjectChangeAction
camera3d.action.TransformAction
camera3d.action.TranslationAction
- All Implemented Interfaces:
- camera3d.action.OptimizableAction
- public class TranslationAction
- extends TransformAction
Action for translating a VcObject.
- Version:
- 1.0
- Author:
- Fábio Roberto de Miranda
Method Summary |
void |
doAction(ActionExecutor executor)
Performs the translation. |
boolean |
optimize(VcAction inputAction)
Tries to eliminate the Action given as input, when possible. |
void |
setTranslationValues(double x,
double y,
double z)
Sets the values by which the VcObject will be translated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TranslationAction
public TranslationAction(VcObject v,
TransformMode mode)
TranslationAction
public TranslationAction(VcObject v,
TransformMode mode,
javax.vecmath.Point3d trans)
setTranslationValues
public void setTranslationValues(double x,
double y,
double z)
- Sets the values by which the VcObject will be translated.
doAction
public void doAction(ActionExecutor executor)
- Performs the translation.
- 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 eliminate the Action given as input, when possible. In case inputAction is not a
TranslationAction, then no optimization can be performed and the method returns false. If
inputAction is a set to an absolute translation its parameters are simply copied into this
object, so inputAction no longer need to be performed. Finally, if inputAction is set to a
relative translation, this object's parameters are set to reflect the combined effects of
this object and inputAction, which is no longer necessary. In both former cases the method
returns true.
- 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.