Class VelthoricClientUtils

java.lang.Object
net.timtaran.interactivemc.util.velthoric.VelthoricClientUtils

public class VelthoricClientUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<Integer>
    bodiesAround(double x, double y, double z, double radius)
    Returns indices of all bodies whose last known position lies within the specified radius from the given center point.
    static List<Integer>
    bodiesAround(com.github.stephengold.joltjni.RVec3 center, double radius)
    Returns indices of all bodies whose last known position lies within the specified radius from the given center point.

    Methods inherited from class java.lang.Object

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

    • VelthoricClientUtils

      public VelthoricClientUtils()
  • Method Details

    • bodiesAround

      public static List<Integer> bodiesAround(com.github.stephengold.joltjni.RVec3 center, double radius)
      Returns indices of all bodies whose last known position lies within the specified radius from the given center point.

      The distance check is performed using squared distance to avoid an expensive square root operation.

      Parameters:
      center - the center point of the search sphere (not null)
      radius - the search radius (must be >= 0)
      Returns:
      a list of indices of bodies located strictly inside the radius
    • bodiesAround

      public static List<Integer> bodiesAround(double x, double y, double z, double radius)
      Returns indices of all bodies whose last known position lies within the specified radius from the given center point.

      The distance check is performed using squared distance to avoid an expensive square root operation.

      Parameters:
      x - the x-coordinate of the search point
      y - the y-coordinate of the search point
      z - the z-coordinate of the search point
      radius - the search radius (must be >= 0)
      Returns:
      a list of indices of bodies located strictly inside the radius