Contents
Class TriggerVolumeShape
java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.shape.TriggerVolumeShape
- Direct Known Subclasses:
BoxShape, CylinderShape, SphereShape
Base shape contract for trigger volumes. Shapes store their geometry relative to the
volume's origin, while containment tests receive world-space points and the world-space
origin separately.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<TriggerVolumeShape> static final CodecMapCodec<TriggerVolumeShape> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancontains(org.joml.Vector3d origin, org.joml.Vector3d testPoint) Returns whether the world-spacetestPointlies inside this origin-relative shape.abstract TriggerVolumeShapecopy()abstract doubleRadius used when this shape must be represented generically for display.abstract doubleMaximum distance from the volume origin to any point in this shape, including offsets.abstract voidgetWorldAABB(org.joml.Vector3d origin, org.joml.Vector3d outMin, org.joml.Vector3d outMax) static voidRegisters the built-in shape types.abstract voidrotateInPlace(float yawRadians) 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.
-
Field Details
-
CODEC
-
BASE_CODEC
-
-
Constructor Details
-
TriggerVolumeShape
public TriggerVolumeShape()
-
-
Method Details
-
contains
public abstract boolean contains(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d testPoint) Returns whether the world-spacetestPointlies inside this origin-relative shape. -
getBoundingRadius
public abstract double getBoundingRadius()Radius used when this shape must be represented generically for display. This may be smaller thangetMaxDistanceFromOrigin()for shapes offset from their origin. -
getMaxDistanceFromOrigin
public abstract double getMaxDistanceFromOrigin()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. -
getWorldAABB
public abstract void getWorldAABB(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d outMin, @Nonnull org.joml.Vector3d outMax) -
rotateInPlace
public abstract void rotateInPlace(float yawRadians) 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. -
copy
-
registerBuiltinShapes
public static void registerBuiltinShapes()Registers the built-in shape types. Must not run from a static initializer: when a subclass loads first, this superclass initializes while the subclassCODECis still null.
-