Class RotateSelection
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.RotateSelection
- 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 rotate a selection of points or triangles around a given axis.
As like any other implementor of AbstractTransform, rotate provides the following
functions based on the given input:
(No Handle Selected) + UP/DOWN KEY:+/-(Z Axis)(No Handle Selected) + UP/DOWN KEY (Arbitrary Axis):+/-(Y Axis)X Handle + UP/DOWN KEY:+/-(X Axis)Y Handle + UP/DOWN KEY:+/-(Y Axis)Z Handle + UP/DOWN KEY:+/-(Z Axis)
Aliases: rot, r
Unlike other AbstractTransform implementors, rotate provides a second (third when
used) optional TypedArg which expects a Vector3 for an arbitrary axis to rotate
around.
The mouse owner for rotate (RotateMouseOwner) actually provides a line indicating
the actual axis you're about to rotate around (Only when a handle is selected. not including an
arbitrary axis)
Typical Usage:
transform rotate - Rotate Faces
trans rot p - Rotate Points
trans rot f (0, 0.2, 1.42) - Rotate Faces around the Vector3 axis (0, 0.2, 1.42)
selection r v (1, 0.3, 0.5) - Rotate Points around the Vector3 axis (1, 0.3, 0.5)
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 TypeMethodDescriptionvoidrotateDownKey(Vector3 a, GPoint gPoint) voidrotateUpKey(Vector3 a, GPoint gPoint) 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, getCurrentStepSize, getGearIndex, getGearTrain, getKeys, getOriginalPointPositions, getReferences, onEnter, onEsc, onEvent, 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
-
rotateMouseOwner
-
axis
-
-
Constructor Details
-
RotateSelection
RotateSelection()
-
-
Method Details
-
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.
-
rotateUpKey
-
rotateDownKey
-