All Implemented Interfaces:
Argument

public class DistanceCmd extends Subcommand
A subcommand of MeasureCmd that calculates and displays the distance between two points.

Aliases: distance, d, dist

Typical Usages:

     measure distance (10, 20, 30) (40, 50, 60) - Measures the distance between two Vector3 points.
     m d 08415ef7-770b-4367-83d6-2dc0c64914b1 ... - Measures the distance between two GPoint objects
     

This command also makes use of BlinkerSwingWorker such as to draw the line between the 2 Vector3 points.

Author:
Lehlogonolo Poole
  • Field Details

    • draw

      private boolean draw
  • Constructor Details

    • DistanceCmd

      public DistanceCmd()
  • Method Details

    • run

      public void run(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs)
      Description copied from class: Command
      The method to be overridden by subclasses to implement command functionality.
      Overrides:
      run in class Command
      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.
    • ghost

      private void ghost(Vector3 A, Vector3 B, double d)