Class RotateSelection

All Implemented Interfaces:
Argument, KeyedStatefulCommand, SemiStatefulCommand, StatefulCommand<Void>, EventListener

public class RotateSelection extends AbstractTransform
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 Details

  • 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: AbstractTransform
      The main entry point for the command. It gathers the selected objects and initiates the stateful transformation mode.
      Overrides:
      run in class AbstractTransform
      Parameters:
      invoker - The invoker of this command
      logLabel - 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

      public void rotateUpKey(Vector3 a, GPoint gPoint)
    • rotateDownKey

      public void rotateDownKey(Vector3 a, GPoint gPoint)