Class ParSLMesh

All Implemented Interfaces:
Pointer

public class ParSLMesh extends Struct<ParSLMesh>

 struct parsl_mesh {
     uint32_t num_vertices;
     uint32_t num_triangles;
     uint32_t * triangle_indices;
     {@link ParSLPosition parsl_position} * positions;
     {@link ParSLAnnotation parsl_annotation} * annotations;
     float * spine_lengths;
     float * random_offsets;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NUM_VERTICES
      The struct member offsets.
    • NUM_TRIANGLES

      public static final int NUM_TRIANGLES
      The struct member offsets.
    • TRIANGLE_INDICES

      public static final int TRIANGLE_INDICES
      The struct member offsets.
    • POSITIONS

      public static final int POSITIONS
      The struct member offsets.
    • ANNOTATIONS

      public static final int ANNOTATIONS
      The struct member offsets.
    • SPINE_LENGTHS

      public static final int SPINE_LENGTHS
      The struct member offsets.
    • RANDOM_OFFSETS

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

    • ParSLMesh

      public ParSLMesh(ByteBuffer container)
      Creates a ParSLMesh 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<ParSLMesh>
    • num_vertices

      public int num_vertices()
      Returns:
      the value of the num_vertices field.
    • num_triangles

      public int num_triangles()
      Returns:
      the value of the num_triangles field.
    • triangle_indices

      public IntBuffer triangle_indices(int capacity)
      Returns:
      a IntBuffer view of the data pointed to by the triangle_indices field.
    • positions

      public ParSLPosition.Buffer positions()
      Returns:
      a ParSLPosition.Buffer view of the struct array pointed to by the positions field.
    • annotations

      public @Nullable ParSLAnnotation.Buffer annotations()
      Returns:
      a ParSLAnnotation.Buffer view of the struct array pointed to by the annotations field.
    • spine_lengths

      public @Nullable FloatBuffer spine_lengths()
      Returns:
      a FloatBuffer view of the data pointed to by the spine_lengths field.
    • random_offsets

      public @Nullable FloatBuffer random_offsets()
      Returns:
      a FloatBuffer view of the data pointed to by the random_offsets field.
    • create

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

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

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

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

      public static int nnum_vertices(long struct)
      Unsafe version of num_vertices().
    • nnum_triangles

      public static int nnum_triangles(long struct)
      Unsafe version of num_triangles().
    • ntriangle_indices

      public static IntBuffer ntriangle_indices(long struct, int capacity)
      Unsafe version of triangle_indices.
    • npositions

      public static ParSLPosition.Buffer npositions(long struct)
      Unsafe version of positions().
    • nannotations

      public static @Nullable ParSLAnnotation.Buffer nannotations(long struct)
      Unsafe version of annotations().
    • nspine_lengths

      public static @Nullable FloatBuffer nspine_lengths(long struct)
      Unsafe version of spine_lengths.
    • nrandom_offsets

      public static @Nullable FloatBuffer nrandom_offsets(long struct)
      Unsafe version of random_offsets.