Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- forEachVector(Iterable, double, double, double, double, Consumer)
- forEachVector(Iterable, double, double, double, double, double, double, Consumer)
- forEachVector(Iterable, Function, double, double, double, double, Consumer)
- forEachVector(Iterable, Function, double, double, double, double, double, double, Consumer)
- forEachVector(Iterable, Function, double, double, double, double, BiConsumer, V)
- forEachVector(Iterable, Function, double, double, double, double, double, double, BiConsumer, V)
- forEachVector(Iterable, Function, double, double, double, double, TriConsumer, V1, V2)
- forEachVector(Iterable, Function, double, double, double, double, double, double, TriConsumer, V1, V2)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, IntObjectConsumer)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, double, double, IntObjectConsumer)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, IntBiObjectConsumer, V)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, double, double, IntBiObjectConsumer, V)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, IntTriObjectConsumer, V1, V2)
- forEachVector(Int2ObjectMap, Function, double, double, double, double, double, double, IntTriObjectConsumer, V1, V2)
- isInside(double, double, double, double, Vector3d)
- isInside(double, double, double, double, double, double, Vector3d)
Class VectorSphereUtil
java.lang.Object
com.hypixel.hytale.math.vector.VectorSphereUtil
Utility class for performing sphere-related vector operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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> voidforEachVector(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> voidforEachVector(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 voidforEachVector(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 voidforEachVector(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> voidforEachVector(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> voidforEachVector(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 booleanisInside(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 booleanisInside(double originX, double originY, double originZ, double radius, org.joml.Vector3d vector) Called to check if a vector is within a sphere.
-
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, void forEachVectorV2> (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, void forEachVectorV2> (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, void forEachVectorV2> (@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, void forEachVectorV2> (@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:
trueif inside,falseotherwise.
-
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:
trueif inside,falseotherwise.
-