Class SelectionUtils

java.lang.Object
com.j3d.engine.interact.selection.SelectionUtils

public abstract class SelectionUtils extends Object
Standard utility functions to use for or in relation to selecting.
Author:
Lehlogonolo Poole
See Also:
  • Constructor Details

    • SelectionUtils

      public SelectionUtils()
  • Method Details

    • usingSelectionVariant

      public static <T> T usingSelectionVariant(SelectionUtils.InferredSelectionType st, boolean isStrict, T addCase, T subCase, T strictCase, T softCase)
      Returns the appropriate selection variant based on the inferred selection type and strictness.
      Type Parameters:
      T - The type of the return value.
      Parameters:
      st - The inferred selection type (NONE, SUBTRACT, ADD).
      isStrict - A boolean indicating if the selection is strict (true) or soft (false).
      addCase - The value to return if the inferred selection type is ADD.
      subCase - The value to return if the inferred selection type is SUBTRACT.
      strictCase - The value to return if the inferred selection type is NONE and the selection is strict.
      softCase - The value to return if the inferred selection type is NONE and the selection is soft.
      Returns:
      The selected variant.