Package guideme.scene
Class GuidebookScene
java.lang.Object
guideme.scene.GuidebookScene
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(SceneAnnotation annotation) void
void
org.joml.Vector2f
documentToScreen
(LytRect viewport, LytPoint documentPoint) Transforms from document coordinates (layout coordinate system) to coordinates in the screen space used by the scene.The camera settings affect layout so this should be called before layout is done (or relayout should be triggered).Stream
<net.minecraft.core.BlockPos> int
getLevel()
org.joml.Vector4f
org.joml.Vector3fc
@Nullable SceneAnnotation
pickAnnotation
(LytPoint point, LytRect viewport, Predicate<? super SceneAnnotation> predicate) Picks a scene annotation given the document point and viewport.net.minecraft.world.phys.BlockHitResult
@Nullable InWorldAnnotation
pickInWorldAnnotation
(float screenX, float screenY, Predicate<? super InWorldAnnotation> predicate) @Nullable OverlayAnnotation
pickOverlayAnnotation
(LytPoint point, LytRect viewport, Predicate<? super OverlayAnnotation> predicate) void
removeAnnotation
(SceneAnnotation annotation) screenToDocument
(org.joml.Vector2f screen, LytRect viewport) Transforms from normalized device coordinates to document coordinates based on the given viewport in that coordinate system.void
setHeight
(int height) org.joml.Vector2f
worldToScreen
(float x, float y, float z) Return the given world position in normalized device coordinates.
-
Constructor Details
-
GuidebookScene
-
-
Method Details
-
getScreenBounds
public org.joml.Vector4f getScreenBounds() -
centerScene
public void centerScene() -
worldToScreen
public org.joml.Vector2f worldToScreen(float x, float y, float z) Return the given world position in normalized device coordinates. -
pickAnnotation
@Nullable public @Nullable SceneAnnotation pickAnnotation(LytPoint point, LytRect viewport, Predicate<? super SceneAnnotation> predicate) Picks a scene annotation given the document point and viewport. Some annotations render as overlays and don't actually have dimensions in the 3d scene, making it necessary to know the viewport. -
pickOverlayAnnotation
@Nullable public @Nullable OverlayAnnotation pickOverlayAnnotation(LytPoint point, LytRect viewport, Predicate<? super OverlayAnnotation> predicate) -
pickInWorldAnnotation
@Nullable public @Nullable InWorldAnnotation pickInWorldAnnotation(float screenX, float screenY, Predicate<? super InWorldAnnotation> predicate) -
pickBlock
-
getFilledBlocks
-
getWorldCenter
public org.joml.Vector3fc getWorldCenter() -
getLevel
-
getCameraSettings
The camera settings affect layout so this should be called before layout is done (or relayout should be triggered). -
clearAnnotations
public void clearAnnotations() -
addAnnotation
-
removeAnnotation
-
getInWorldAnnotations
-
getOverlayAnnotations
-
documentToScreen
Transforms from document coordinates (layout coordinate system) to coordinates in the screen space used by the scene. -
screenToDocument
Transforms from normalized device coordinates to document coordinates based on the given viewport in that coordinate system. -
getHeight
public int getHeight() -
setHeight
public void setHeight(int height)
-