Package guideme.scene.annotation
Class InWorldBoxAnnotation
java.lang.Object
guideme.scene.annotation.SceneAnnotation
guideme.scene.annotation.InWorldAnnotation
guideme.scene.annotation.InWorldBoxAnnotation
- All Implemented Interfaces:
guideme.internal.siteexport.ExportableResourceProvider
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInWorldBoxAnnotation
(org.joml.Vector3f minCorner, org.joml.Vector3f maxCorner, ColorValue color) InWorldBoxAnnotation
(org.joml.Vector3f minCorner, org.joml.Vector3f maxCorner, ColorValue color, float thickness) -
Method Summary
Modifier and TypeMethodDescriptioncolor()
static InWorldBoxAnnotation
forBlock
(net.minecraft.core.BlockPos pos, ColorValue color) org.apache.commons.lang3.tuple.Pair
<org.joml.Vector2f, org.joml.Vector2f> getScreenBounds
(org.joml.Matrix4f viewMatrix) Computes the screen bounding box for this highlighted box, given a view matrix to transform the corners of this box in to screen space.intersect
(org.joml.Vector3f rayOrigin, org.joml.Vector3f rayDir) Tests if the given ray intersects this highlighted box.org.joml.Vector3f
max()
org.joml.Vector3f
min()
float
Methods inherited from class guideme.scene.annotation.InWorldAnnotation
isAlwaysOnTop, setAlwaysOnTop
Methods inherited from class guideme.scene.annotation.SceneAnnotation
exportResources, getTooltip, hasTooltip, isHovered, setHovered, setTooltip, setTooltipContent, setTooltipContent
-
Field Details
-
DEFAULT_THICKNESS
public static final float DEFAULT_THICKNESS- See Also:
-
-
Constructor Details
-
InWorldBoxAnnotation
public InWorldBoxAnnotation(org.joml.Vector3f minCorner, org.joml.Vector3f maxCorner, ColorValue color, float thickness) -
InWorldBoxAnnotation
public InWorldBoxAnnotation(org.joml.Vector3f minCorner, org.joml.Vector3f maxCorner, ColorValue color)
-
-
Method Details
-
forBlock
-
intersect
Tests if the given ray intersects this highlighted box.- Specified by:
intersect
in classInWorldAnnotation
- Returns:
- Absent if no intersection exists, otherwise a number between 0 and 1 indicating the distance from the ray origin (along the ray) that the intersection closest to the origin occurred.
-
getScreenBounds
public org.apache.commons.lang3.tuple.Pair<org.joml.Vector2f,org.joml.Vector2f> getScreenBounds(org.joml.Matrix4f viewMatrix) Computes the screen bounding box for this highlighted box, given a view matrix to transform the corners of this box in to screen space.- Specified by:
getScreenBounds
in classInWorldAnnotation
- Returns:
- A pair of the min and max screen coordinates.
-
min
public org.joml.Vector3f min() -
max
public org.joml.Vector3f max() -
color
-
thickness
public float thickness()
-