Class ParSLAnnotation

All Implemented Interfaces:
Pointer

public class ParSLAnnotation extends Struct<ParSLAnnotation>
Layout for generated vertex attributes.

Layout


 struct parsl_annotation {
     float u_along_curve();
     float v_across_curve();
     float spine_to_edge_x();
     float spine_to_edge_y();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • U_ALONG_CURVE

      public static final int U_ALONG_CURVE
      The struct member offsets.
    • V_ACROSS_CURVE

      public static final int V_ACROSS_CURVE
      The struct member offsets.
    • SPINE_TO_EDGE_X

      public static final int SPINE_TO_EDGE_X
      The struct member offsets.
    • SPINE_TO_EDGE_Y

      public static final int SPINE_TO_EDGE_Y
      The struct member offsets.
  • Constructor Details

    • ParSLAnnotation

      public ParSLAnnotation(ByteBuffer container)
      Creates a ParSLAnnotation instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ParSLAnnotation>
    • u_along_curve

      public float u_along_curve()
      longitudinal coordinate (see parsl_u_mode)
    • v_across_curve

      public float v_across_curve()
      either + or - depending on the side
    • spine_to_edge_x

      public float spine_to_edge_x()
      normalized vector from spine to edge
    • spine_to_edge_y

      public float spine_to_edge_y()
      normalized vector from spine to edge
    • create

      public static ParSLAnnotation create(long address)
      Returns a new ParSLAnnotation instance for the specified memory address.
    • createSafe

      @Nullable public static ParSLAnnotation createSafe(long address)
      Like create, but returns null if address is NULL.
    • create

      public static ParSLAnnotation.Buffer create(long address, int capacity)
      Create a ParSLAnnotation.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static ParSLAnnotation.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • nu_along_curve

      public static float nu_along_curve(long struct)
      Unsafe version of u_along_curve().
    • nv_across_curve

      public static float nv_across_curve(long struct)
      Unsafe version of v_across_curve().
    • nspine_to_edge_x

      public static float nspine_to_edge_x(long struct)
      Unsafe version of spine_to_edge_x().
    • nspine_to_edge_y

      public static float nspine_to_edge_y(long struct)
      Unsafe version of spine_to_edge_y().