Class VelthoricClientUtils
java.lang.Object
net.timtaran.interactivemc.util.velthoric.VelthoricClientUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbodiesAround(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.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.
-
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
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 pointy- the y-coordinate of the search pointz- the z-coordinate of the search pointradius- the search radius (must be >= 0)- Returns:
- a list of indices of bodies located strictly inside the radius
-