Class TranslateSelection
java.lang.Object
com.j3d.engine.interact.cmd.base.Command
com.j3d.engine.interact.cmd.args.Subcommand
com.j3d.engine.interact.cmd.commands.transform.AbstractTransform
com.j3d.engine.interact.cmd.commands.transform.TranslateSelection
- All Implemented Interfaces:
Argument,KeyedStatefulCommand,SemiStatefulCommand,StatefulCommand<Void>,EventListener
A sub-command of
TransformCmd who uses the handles made by AbstractTransform
and the key-setters provided by AbstractTransform from KeyedStatefulCommand
to translate a selection of points or triangles.
As like any other implementor of AbstractTransform, translate provides the following
functions based on the given input:
(No Handle Selected) + UP/DOWN KEY:+/-Z(No Handle Selected) + LEFT/RIGHT KEY:+/-XX Handle + UP/DOWN KEY:+/-XY Handle + UP/DOWN KEY:+/-YZ Handle + UP/DOWN KEY:+/-Z
Aliases: t, trans, move, mv, m
The mouse owner for translate (TranslateMouseOwner) provides no extra drawing or logic other than handle clicking
which is inherited from TransformMouseOwner
Typical Usage:
transform t - Translate selection in face mode
transform move f - Translate selection in face mode
transform mv t - Translate selection in face mode
t t v - Translate selection in point mode
t mv p - Translate seleciton in point mode
trans trans - Translate selection in face mode
See AbstractTransform for more information onthe distinction between point mode and face mode.- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
FieldsFields inherited from class com.j3d.engine.interact.cmd.commands.transform.AbstractTransform
argSet, center, currentIndex, eventName, faceMode, gear, gearTrain, keys, label, originalPointPos, overlapId, referencesFields inherited from class com.j3d.engine.interact.cmd.base.Command
aliases, args, description, usages -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the currently active step size from the gear train.<K> voidonEvent(EventType event, EventPayload<K> properties) onEvent is called byEventEmitterviaEventEmitter.broadcast(EventType, EventPayload).voidrun(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs) The main entry point for the command.Methods inherited from class com.j3d.engine.interact.cmd.commands.transform.AbstractTransform
finished, getGearIndex, getGearTrain, getKeys, getOriginalPointPositions, getReferences, onEnter, onEsc, onStart, selfName, setGearIndexMethods inherited from class com.j3d.engine.interact.cmd.args.Subcommand
getDescription, getName, isOptionalMethods inherited from class com.j3d.engine.interact.cmd.base.Command
addNoArgUsage, aliases, aliasStream, args, dispatchToSubcommands, getUsages, hasNoArgs, parseUsages, usages, varTaggedArgsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.j3d.engine.interact.cmd.base.KeyedStatefulCommand
newGearKey, setDownKey, setKey, setKeyAsSideEffects, setLeftKey, setRightKey, setUpKeyMethods inherited from interface com.j3d.engine.interact.cmd.base.SemiStatefulCommand
fireMethods inherited from interface com.j3d.engine.interact.cmd.base.StatefulCommand
run, run
-
Field Details
-
translateMouseOwner
-
mult
private double mult
-
-
Constructor Details
-
TranslateSelection
TranslateSelection()
-
-
Method Details
-
onEvent
Description copied from interface:EventListeneronEvent is called byEventEmitterviaEventEmitter.broadcast(EventType, EventPayload). Allowing the emitter to call any other object that implements this.- Specified by:
onEventin interfaceEventListener- Overrides:
onEventin classAbstractTransform- Type Parameters:
K- The type of the emitter of this event- Parameters:
event- The type of eventproperties- The given event payload
-
getCurrentStepSize
public double getCurrentStepSize()Description copied from class:AbstractTransformGets the currently active step size from the gear train.- Overrides:
getCurrentStepSizein classAbstractTransform- Returns:
- The current step size.
-
run
public void run(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs) Description copied from class:AbstractTransformThe main entry point for the command. It gathers the selected objects and initiates the stateful transformation mode.- Overrides:
runin classAbstractTransform- Parameters:
invoker- The invoker of this commandlogLabel- The JLabel to display log messages.aliasUsed- The alias of the command that was used to invoke it.args- The arguments passed to the command.taggedArgs- Tagged arguments passed to the command.
-