Contents
Class BoxShape
java.lang.Object
com.hypixel.hytale.builtin.triggervolumes.shape.TriggerVolumeShape
com.hypixel.hytale.builtin.triggervolumes.shape.BoxShape
Box volume shape.
Min/Max define the unrotated box relative to the volume
origin; the optional Rotation (pitch, yaw, roll in radians) orients the box around
its own center, turning containment into an OBB test.-
Field Summary
FieldsFields inherited from class TriggerVolumeShape
BASE_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(org.joml.Vector3d origin, org.joml.Vector3d testPoint) Returns whether the world-spacetestPointlies inside this origin-relative shape.copy()doubleRadius used when this shape must be represented generically for display.org.joml.Vector3dgetMax()doubleMaximum distance from the volume origin to any point in this shape, including offsets.org.joml.Vector3dgetMin()org.joml.Vector3dPitch (X), yaw (Y), roll (Z) in radians, or null when axis-aligned.voidgetWorldAABB(org.joml.Vector3d origin, org.joml.Vector3d outMin, org.joml.Vector3d outMax) booleanvoidrotateInPlace(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.voidsetRotation(org.joml.Vector3d rotation) Methods inherited from class TriggerVolumeShape
registerBuiltinShapes
-
Field Details
-
CODEC
-
-
Constructor Details
-
BoxShape
public BoxShape() -
BoxShape
public BoxShape(@Nonnull org.joml.Vector3d min, @Nonnull org.joml.Vector3d max) -
BoxShape
public BoxShape(@Nonnull org.joml.Vector3d min, @Nonnull org.joml.Vector3d max, @Nullable org.joml.Vector3d rotation)
-
-
Method Details
-
hasRotation
public boolean hasRotation() -
contains
public boolean contains(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d testPoint) Description copied from class:TriggerVolumeShapeReturns whether the world-spacetestPointlies inside this origin-relative shape.- Specified by:
containsin classTriggerVolumeShape
-
getBoundingRadius
public double getBoundingRadius()Description copied from class:TriggerVolumeShapeRadius used when this shape must be represented generically for display. This may be smaller thanTriggerVolumeShape.getMaxDistanceFromOrigin()for shapes offset from their origin.- Specified by:
getBoundingRadiusin classTriggerVolumeShape
-
getMaxDistanceFromOrigin
public double getMaxDistanceFromOrigin()Description copied from class:TriggerVolumeShapeMaximum 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:
getMaxDistanceFromOriginin classTriggerVolumeShape
-
getWorldAABB
public void getWorldAABB(@Nonnull org.joml.Vector3d origin, @Nonnull org.joml.Vector3d outMin, @Nonnull org.joml.Vector3d outMax) - Specified by:
getWorldAABBin classTriggerVolumeShape
-
rotateInPlace
public void rotateInPlace(float yawRadians) Description copied from class:TriggerVolumeShapeBakes 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:
rotateInPlacein classTriggerVolumeShape
-
copy
- Specified by:
copyin classTriggerVolumeShape
-
getMin
@Nonnull public org.joml.Vector3d getMin() -
getMax
@Nonnull public org.joml.Vector3d getMax() -
getRotation
@Nullable public org.joml.Vector3d getRotation()Pitch (X), yaw (Y), roll (Z) in radians, or null when axis-aligned. -
setRotation
public void setRotation(@Nullable org.joml.Vector3d rotation)
-