Class VectorSphereUtil

java.lang.Object
com.hypixel.hytale.math.vector.VectorSphereUtil

public class VectorSphereUtil extends Object
Utility class for performing sphere-related vector operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T,V> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, IntBiObjectConsumer<T,V> consumer, V objV)
    Called to iterate over map values with a vector mapping within an ellipsoid.
    static <T> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, IntObjectConsumer<T> consumer)
    Called to iterate over map values with a vector mapping within an ellipsoid.
    static <T,V1,V2> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, IntTriObjectConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
    Called to iterate over map values with a vector mapping within an ellipsoid.
    static <T,V> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, IntBiObjectConsumer<T,V> consumer, V objV)
    Called to iterate over map values with a vector mapping within a sphere.
    static <T> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, IntObjectConsumer<T> consumer)
    Called to iterate over map values with a vector mapping within a sphere.
    static <T,V1,V2> void
    forEachVector(it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, IntTriObjectConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
    Called to iterate over map values with a vector mapping within a sphere.
    static void
    forEachVector(Iterable<org.joml.Vector3d> vectors, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, Consumer<org.joml.Vector3d> consumer)
    Called to iterate over vectors within an ellipsoid.
    static void
    forEachVector(Iterable<org.joml.Vector3d> vectors, double originX, double originY, double originZ, double radius, Consumer<org.joml.Vector3d> consumer)
    Called to iterate over vectors within a sphere.
    static <T,V1,V2> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, TriConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
    Called to iterate over elements with a vector mapping within an ellipsoid.
    static <T,V> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, BiConsumer<T,V> consumer, V objV)
    Called to iterate over elements with a vector mapping within an ellipsoid.
    static <T> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, Consumer<T> consumer)
    Called to iterate over elements with a vector mapping within an ellipsoid.
    static <T,V1,V2> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, TriConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
    Called to iterate over elements with a vector mapping within a sphere.
    static <T,V> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, BiConsumer<T,V> consumer, V objV)
    Called to iterate over elements with a vector mapping within a sphere.
    static <T> void
    forEachVector(Iterable<T> input, Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, Consumer<T> consumer)
    Called to iterate over elements with a vector mapping within a sphere.
    static boolean
    isInside(double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, org.joml.Vector3d vector)
    Called to check if a vector is within an ellipsoid.
    static boolean
    isInside(double originX, double originY, double originZ, double radius, org.joml.Vector3d vector)
    Called to check if a vector is within a sphere.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VectorSphereUtil

      public VectorSphereUtil()
  • Method Details

    • forEachVector

      public static void forEachVector(Iterable<org.joml.Vector3d> vectors, double originX, double originY, double originZ, double radius, Consumer<org.joml.Vector3d> consumer)
      Called to iterate over vectors within a sphere.
      Parameters:
      vectors - The vectors to iterate over.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The consumer.
    • forEachVector

      public static void forEachVector(Iterable<org.joml.Vector3d> vectors, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, Consumer<org.joml.Vector3d> consumer)
      Called to iterate over vectors within an ellipsoid.
      Parameters:
      vectors - The vectors to iterate over.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The consumer.
    • forEachVector

      public static <T> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, Consumer<T> consumer)
      Called to iterate over elements with a vector mapping within a sphere.
      Type Parameters:
      T - The element type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The consumer.
    • forEachVector

      public static <T> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, Consumer<T> consumer)
      Called to iterate over elements with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The element type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The consumer.
    • forEachVector

      public static <T,V> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, BiConsumer<T,V> consumer, V objV)
      Called to iterate over elements with a vector mapping within a sphere.
      Type Parameters:
      T - The element type.
      V - The auxiliary object type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The bi-consumer.
      objV - The auxiliary object.
    • forEachVector

      public static <T,V> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, BiConsumer<T,V> consumer, V objV)
      Called to iterate over elements with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The element type.
      V - The auxiliary object type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The bi-consumer.
      objV - The auxiliary object.
    • forEachVector

      public static <T,V1,V2> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, @Nonnull TriConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
      Called to iterate over elements with a vector mapping within a sphere.
      Type Parameters:
      T - The element type.
      V1 - The first auxiliary object type.
      V2 - The second auxiliary object type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The tri-consumer.
      objV1 - The first auxiliary object.
      objV2 - The second auxiliary object.
    • forEachVector

      public static <T,V1,V2> void forEachVector(Iterable<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, @Nonnull TriConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
      Called to iterate over elements with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The element type.
      V1 - The first auxiliary object type.
      V2 - The second auxiliary object type.
      Parameters:
      input - The elements to iterate over.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The tri-consumer.
      objV1 - The first auxiliary object.
      objV2 - The second auxiliary object.
    • forEachVector

      public static <T> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, IntObjectConsumer<T> consumer)
      Called to iterate over map values with a vector mapping within a sphere.
      Type Parameters:
      T - The value type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The consumer.
    • forEachVector

      public static <T> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, IntObjectConsumer<T> consumer)
      Called to iterate over map values with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The value type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The consumer.
    • forEachVector

      public static <T,V> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, IntBiObjectConsumer<T,V> consumer, V objV)
      Called to iterate over map values with a vector mapping within a sphere.
      Type Parameters:
      T - The value type.
      V - The auxiliary object type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The bi-consumer.
      objV - The auxiliary object.
    • forEachVector

      public static <T,V> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, IntBiObjectConsumer<T,V> consumer, V objV)
      Called to iterate over map values with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The value type.
      V - The auxiliary object type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The bi-consumer.
      objV - The auxiliary object.
    • forEachVector

      public static <T,V1,V2> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radius, @Nonnull IntTriObjectConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
      Called to iterate over map values with a vector mapping within a sphere.
      Type Parameters:
      T - The value type.
      V1 - The first auxiliary object type.
      V2 - The second auxiliary object type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      consumer - The tri-consumer.
      objV1 - The first auxiliary object.
      objV2 - The second auxiliary object.
    • forEachVector

      public static <T,V1,V2> void forEachVector(@Nonnull it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> input, @Nonnull Function<T, org.joml.Vector3d> func, double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, @Nonnull IntTriObjectConsumer<T,V1,V2> consumer, V1 objV1, V2 objV2)
      Called to iterate over map values with a vector mapping within an ellipsoid.
      Type Parameters:
      T - The value type.
      V1 - The first auxiliary object type.
      V2 - The second auxiliary object type.
      Parameters:
      input - The map.
      func - The vector mapping function.
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      consumer - The tri-consumer.
      objV1 - The first auxiliary object.
      objV2 - The second auxiliary object.
    • isInside

      public static boolean isInside(double originX, double originY, double originZ, double radius, @Nonnull org.joml.Vector3d vector)
      Called to check if a vector is within a sphere.
      Parameters:
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radius - The radius.
      vector - The vector.
      Returns:
      true if inside, false otherwise.
    • isInside

      public static boolean isInside(double originX, double originY, double originZ, double radiusX, double radiusY, double radiusZ, @Nonnull org.joml.Vector3d vector)
      Called to check if a vector is within an ellipsoid.
      Parameters:
      originX - The X origin.
      originY - The Y origin.
      originZ - The Z origin.
      radiusX - The X radius.
      radiusY - The Y radius.
      radiusZ - The Z radius.
      vector - The vector.
      Returns:
      true if inside, false otherwise.