Class TranslateSelection

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

public class TranslateSelection extends AbstractTransform
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 : +/-X
  • X Handle + UP/DOWN KEY : +/-X
  • Y Handle + UP/DOWN KEY : +/-Y
  • Z 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 Details

    • translateMouseOwner

      public static TranslateMouseOwner translateMouseOwner
    • mult

      private double mult
  • Constructor Details

    • TranslateSelection

      TranslateSelection()
  • Method Details

    • onEvent

      public <K> void onEvent(EventType event, EventPayload<K> properties)
      Description copied from interface: EventListener
      onEvent is called by EventEmitter via EventEmitter.broadcast(EventType, EventPayload). Allowing the emitter to call any other object that implements this.
      Specified by:
      onEvent in interface EventListener
      Overrides:
      onEvent in class AbstractTransform
      Type Parameters:
      K - The type of the emitter of this event
      Parameters:
      event - The type of event
      properties - The given event payload
    • getCurrentStepSize

      public double getCurrentStepSize()
      Description copied from class: AbstractTransform
      Gets the currently active step size from the gear train.
      Overrides:
      getCurrentStepSize in class AbstractTransform
      Returns:
      The current step size.
    • run

      public void run(@NotNull Invoker invoker, SafeJLabel logLabel, String aliasUsed, @NotNull Object[] args, @NotNull 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.