Class InWorldBoxAnnotation

All Implemented Interfaces:
guideme.internal.siteexport.ExportableResourceProvider

public final class InWorldBoxAnnotation extends InWorldAnnotation
  • Field Details

  • 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

      public static InWorldBoxAnnotation forBlock(net.minecraft.core.BlockPos pos, ColorValue color)
    • intersect

      public OptionalDouble intersect(org.joml.Vector3f rayOrigin, org.joml.Vector3f rayDir)
      Tests if the given ray intersects this highlighted box.
      Specified by:
      intersect in class InWorldAnnotation
      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 class InWorldAnnotation
      Returns:
      A pair of the min and max screen coordinates.
    • min

      public org.joml.Vector3f min()
    • max

      public org.joml.Vector3f max()
    • color

      public ColorValue color()
    • thickness

      public float thickness()