Package guideme.scene.annotation
Class InWorldBoxAnnotation
java.lang.Object
guideme.scene.annotation.SceneAnnotation
guideme.scene.annotation.InWorldAnnotation
guideme.scene.annotation.InWorldBoxAnnotation
- All Implemented Interfaces:
ExportableResourceProvider
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInWorldBoxAnnotation(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 InWorldBoxAnnotationforBlock(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.Vector3fmax()org.joml.Vector3fmin()floatMethods inherited from class guideme.scene.annotation.InWorldAnnotation
isAlwaysOnTop, setAlwaysOnTopMethods 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:
intersectin 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:
getScreenBoundsin 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()
-