Class SphereShape

java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.shape.TriggerVolumeShape
com.hypixel.hytale.builtin.triggervolumes.shape.SphereShape

public class SphereShape extends TriggerVolumeShape
  • Field Details

  • Constructor Details

    • SphereShape

      public SphereShape()
    • SphereShape

      public SphereShape(@Nonnull org.joml.Vector3d center, double radius)
  • Method Details

    • contains

      public boolean contains(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d testPoint)
      Description copied from class: TriggerVolumeShape
      Returns whether the world-space testPoint lies inside this origin-relative shape.
      Specified by:
      contains in class TriggerVolumeShape
    • getBoundingRadius

      public double getBoundingRadius()
      Description copied from class: TriggerVolumeShape
      Radius used when this shape must be represented generically for display. This may be smaller than TriggerVolumeShape.getMaxDistanceFromOrigin() for shapes offset from their origin.
      Specified by:
      getBoundingRadius in class TriggerVolumeShape
    • getMaxDistanceFromOrigin

      public double getMaxDistanceFromOrigin()
      Description copied from class: TriggerVolumeShape
      Maximum distance from the volume origin to any point in this shape, including offsets. The spatial index uses this as the conservative query radius before exact shape tests.
      Specified by:
      getMaxDistanceFromOrigin in class TriggerVolumeShape
    • getWorldAABB

      public void getWorldAABB(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d outMin, @Nonnull org.joml.Vector3d outMax)
      Specified by:
      getWorldAABB in class TriggerVolumeShape
    • rotateInPlace

      public void rotateInPlace(float yawRadians)
      Description copied from class: TriggerVolumeShape
      Bakes a yaw rotation into the stored shape data during paste/worldgen conversion so runtime containment checks can stay axis-aligned to the stored shape representation.
      Specified by:
      rotateInPlace in class TriggerVolumeShape
    • copy

      @Nonnull public SphereShape copy()
      Specified by:
      copy in class TriggerVolumeShape
    • getCenter

      @Nonnull public org.joml.Vector3d getCenter()
    • getRadius

      public double getRadius()