Class VisHelper

java.lang.Object
com.hypixel.hytale.server.npc.util.VisHelper

public class VisHelper extends Object
Helper for rendering debug shapes (arrows, spheres) in the world via DebugUtils, using shared constants for scale, time, and default opacity.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.joml.Vector3f
     
    static final org.joml.Vector3f
     
    static final org.joml.Vector3f
     
    static final org.joml.Vector3f
     
    static final double
     
    static final double
     
    static final float
     
    static final double
     
    static final float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    renderDebugSphere(org.joml.Vector3d position, double radius, org.joml.Vector3f color, float opacity, World world)
    Renders a debug sphere at the given position with the given radius and opacity.
    static void
    renderDebugSphere(org.joml.Vector3d position, double radius, org.joml.Vector3f color, World world)
    Renders a debug sphere at the given position with the given radius and default opacity.
    static void
    renderDebugSphere(org.joml.Vector3d position, org.joml.Vector3f color, float opacity, World world)
    Renders a debug sphere at the given position with default scale and the specified opacity.
    static void
    renderDebugSphere(org.joml.Vector3d position, org.joml.Vector3f color, World world)
    Renders a debug sphere at the given position with default scale and opacity.
    static void
    renderDebugVector(org.joml.Vector3d position, org.joml.Vector3d direction, org.joml.Vector3f color, float opacity, World world)
    Renders a debug arrow at the given position in the given direction with the specified opacity.
    static void
    renderDebugVector(org.joml.Vector3d position, org.joml.Vector3d direction, org.joml.Vector3f color, World world)
    Renders a debug arrow at the given position in the given direction, using default opacity.
    static void
    renderDebugVectorTo(org.joml.Vector3d position, org.joml.Vector3d direction, org.joml.Vector3f color, float opacity, World world)
    Renders a debug arrow from (position - scaledDirection) to position with the specified opacity.
    static void
    renderDebugVectorTo(org.joml.Vector3d position, org.joml.Vector3d direction, org.joml.Vector3f color, World world)
    Renders a debug arrow from (position - scaledDirection) to position, using default opacity.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEBUG_COLOR_STEERING_POST

      public static final org.joml.Vector3f DEBUG_COLOR_STEERING_POST
    • DEBUG_COLOR_STEERING_PRE

      public static final org.joml.Vector3f DEBUG_COLOR_STEERING_PRE
    • DEBUG_COLOR_AVOIDANCE

      public static final org.joml.Vector3f DEBUG_COLOR_AVOIDANCE
    • DEBUG_COLOR_SEPARATION

      public static final org.joml.Vector3f DEBUG_COLOR_SEPARATION
    • DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED

      public static final double DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED
      See Also:
    • DEBUG_VECTORS_SCALE

      public static final double DEBUG_VECTORS_SCALE
      See Also:
    • DEBUG_VECTORS_TIME

      public static final float DEBUG_VECTORS_TIME
      See Also:
    • DEBUG_TRANSPARENT

      public static final float DEBUG_TRANSPARENT
      See Also:
    • DEBUG_SPHERE_SCALE

      public static final double DEBUG_SPHERE_SCALE
      See Also:
  • Constructor Details

    • VisHelper

      public VisHelper()
  • Method Details

    • renderDebugVector

      public static void renderDebugVector(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, @Nonnull org.joml.Vector3f color, @Nonnull World world)
      Renders a debug arrow at the given position in the given direction, using default opacity.
      Parameters:
      position - arrow origin in world space
      direction - arrow direction (scaled by DEBUG_VECTORS_SCALE); no-op if below DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED
      color - arrow color
      world - world to render in
    • renderDebugVector

      public static void renderDebugVector(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, @Nonnull org.joml.Vector3f color, float opacity, @Nonnull World world)
      Renders a debug arrow at the given position in the given direction with the specified opacity.
      Parameters:
      position - arrow origin in world space
      direction - arrow direction (scaled by DEBUG_VECTORS_SCALE); no-op if below DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED
      color - arrow color
      opacity - opacity for the debug shape
      world - world to render in
    • renderDebugVectorTo

      public static void renderDebugVectorTo(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, @Nonnull org.joml.Vector3f color, @Nonnull World world)
      Renders a debug arrow from (position - scaledDirection) to position, using default opacity.
      Parameters:
      position - arrow end point in world space
      direction - direction from start to end (scaled by DEBUG_VECTORS_SCALE); no-op if below DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED
      color - arrow color
      world - world to render in
    • renderDebugVectorTo

      public static void renderDebugVectorTo(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, @Nonnull org.joml.Vector3f color, float opacity, @Nonnull World world)
      Renders a debug arrow from (position - scaledDirection) to position with the specified opacity.
      Parameters:
      position - arrow end point in world space
      direction - direction from start to end (scaled by DEBUG_VECTORS_SCALE); no-op if below DEBUG_MIN_VECTOR_DRAW_LENGTH_SQUARED
      color - arrow color
      opacity - opacity for the debug shape
      world - world to render in
    • renderDebugSphere

      public static void renderDebugSphere(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3f color, @Nonnull World world)
      Renders a debug sphere at the given position with default scale and opacity.
      Parameters:
      position - center of the sphere in world space
      color - sphere color
      world - world to render in
    • renderDebugSphere

      public static void renderDebugSphere(@Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3f color, float opacity, @Nonnull World world)
      Renders a debug sphere at the given position with default scale and the specified opacity.
      Parameters:
      position - center of the sphere in world space
      color - sphere color
      opacity - opacity for the debug shape
      world - world to render in
    • renderDebugSphere

      public static void renderDebugSphere(@Nonnull org.joml.Vector3d position, double radius, @Nonnull org.joml.Vector3f color, @Nonnull World world)
      Renders a debug sphere at the given position with the given radius and default opacity.
      Parameters:
      position - center of the sphere in world space
      radius - sphere radius (scale)
      color - sphere color
      world - world to render in
    • renderDebugSphere

      public static void renderDebugSphere(@Nonnull org.joml.Vector3d position, double radius, @Nonnull org.joml.Vector3f color, float opacity, @Nonnull World world)
      Renders a debug sphere at the given position with the given radius and opacity.
      Parameters:
      position - center of the sphere in world space
      radius - sphere radius (scale)
      color - sphere color
      opacity - opacity for the debug shape
      world - world to render in