Package guideme.scene.annotation
Class InWorldLineAnnotation
java.lang.Object
guideme.scene.annotation.SceneAnnotation
guideme.scene.annotation.InWorldAnnotation
guideme.scene.annotation.InWorldLineAnnotation
- All Implemented Interfaces:
guideme.internal.siteexport.ExportableResourceProvider
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInWorldLineAnnotation
(org.joml.Vector3f from, org.joml.Vector3f to, ColorValue color) InWorldLineAnnotation
(org.joml.Vector3f from, org.joml.Vector3f to, ColorValue color, float thickness) -
Method Summary
Modifier and TypeMethodDescriptioncolor()
org.apache.commons.lang3.tuple.Pair
<org.joml.Vector2f, org.joml.Vector2f> getScreenBounds
(org.joml.Matrix4f viewMatrix) Computes the screen bounding box for this line, given a view matrix to transform the start and end of the line into 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
-
InWorldLineAnnotation
public InWorldLineAnnotation(org.joml.Vector3f from, org.joml.Vector3f to, ColorValue color, float thickness) -
InWorldLineAnnotation
-
-
Method Details
-
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 line, given a view matrix to transform the start and end of the line into screen space. Since lines are extruded, we compute the bounds around the 8 corners around both end-points.- 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()
-