Class ParSLAnnotation

  • All Implemented Interfaces:
    Pointer

    public class ParSLAnnotation
    extends Struct
    Layout for generated vertex attributes.

    Member documentation

    • u_along_curve – longitudinal coordinate (see parsl_u_mode)
    • v_across_curve – either + or - depending on the side
    • spine_to_edge_x – normalized vector from spine to edge
    • spine_to_edge_y – normalized vector from spine to edge

    Layout

    
     struct parsl_annotation {
         float u_along_curve;
         float v_across_curve;
         float spine_to_edge_x;
         float spine_to_edge_y;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • U_ALONG_CURVE, V_ACROSS_CURVE, SPINE_TO_EDGE_X, SPINE_TO_EDGE_Y

        The struct member offsets.
    • Constructor Detail

      • ParSLAnnotation

        public ParSLAnnotation​(java.nio.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 Detail

      • sizeof

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

        public float u_along_curve()
        Returns the value of the u_along_curve field.
      • v_across_curve

        public float v_across_curve()
        Returns the value of the v_across_curve field.
      • spine_to_edge_x

        public float spine_to_edge_x()
        Returns the value of the spine_to_edge_x field.
      • spine_to_edge_y

        public float spine_to_edge_y()
        Returns the value of the spine_to_edge_y field.
      • 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().