Class ParOctasphereMesh

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class ParOctasphereMesh
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct par_octasphere_mesh {
         float * positions;
         float * normals;
         float * texcoords;
         uint16_t * indices;
         uint32_t num_indices;
         uint32_t num_vertices;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • POSITIONS, NORMALS, TEXCOORDS, INDICES, NUM_INDICES, NUM_VERTICES

        The struct member offsets.
    • Constructor Detail

      • ParOctasphereMesh

        public ParOctasphereMesh​(java.nio.ByteBuffer container)
        Creates a ParOctasphereMesh 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • positions

        public java.nio.FloatBuffer positions​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        a FloatBuffer view of the data pointed to by the positions field.
      • normals

        @Nullable
        public java.nio.FloatBuffer normals​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        a FloatBuffer view of the data pointed to by the normals field.
      • texcoords

        @Nullable
        public java.nio.FloatBuffer texcoords​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        a FloatBuffer view of the data pointed to by the texcoords field.
      • indices

        public java.nio.ShortBuffer indices​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        a ShortBuffer view of the data pointed to by the indices field.
      • num_indices

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

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

        public ParOctasphereMesh positions​(java.nio.FloatBuffer value)
        Sets the address of the specified FloatBuffer to the positions field.
      • normals

        public ParOctasphereMesh normals​(@Nullable
                                         java.nio.FloatBuffer value)
        Sets the address of the specified FloatBuffer to the normals field.
      • texcoords

        public ParOctasphereMesh texcoords​(@Nullable
                                           java.nio.FloatBuffer value)
        Sets the address of the specified FloatBuffer to the texcoords field.
      • indices

        public ParOctasphereMesh indices​(java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the indices field.
      • set

        public ParOctasphereMesh set​(java.nio.FloatBuffer positions,
                                     @Nullable
                                     java.nio.FloatBuffer normals,
                                     @Nullable
                                     java.nio.FloatBuffer texcoords,
                                     java.nio.ShortBuffer indices)
        Initializes this struct with the specified values.
      • malloc

        public static ParOctasphereMesh malloc()
        Returns a new ParOctasphereMesh instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static ParOctasphereMesh calloc()
        Returns a new ParOctasphereMesh instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static ParOctasphereMesh create()
        Returns a new ParOctasphereMesh instance allocated with BufferUtils.
      • create

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

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

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

        public static ParOctasphereMesh malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new ParOctasphereMesh instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static ParOctasphereMesh calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new ParOctasphereMesh instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static ParOctasphereMesh.Buffer malloc​(int capacity,
                                                      org.lwjgl.system.MemoryStack stack)
        Returns a new ParOctasphereMesh.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static ParOctasphereMesh.Buffer calloc​(int capacity,
                                                      org.lwjgl.system.MemoryStack stack)
        Returns a new ParOctasphereMesh.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • npositions

        public static java.nio.FloatBuffer npositions​(long struct,
                                                      int capacity)
        Unsafe version of positions.
      • nnormals

        @Nullable
        public static java.nio.FloatBuffer nnormals​(long struct,
                                                    int capacity)
        Unsafe version of normals.
      • ntexcoords

        @Nullable
        public static java.nio.FloatBuffer ntexcoords​(long struct,
                                                      int capacity)
        Unsafe version of texcoords.
      • nindices

        public static java.nio.ShortBuffer nindices​(long struct,
                                                    int capacity)
        Unsafe version of indices.
      • nnum_indices

        public static int nnum_indices​(long struct)
        Unsafe version of num_indices().
      • nnum_vertices

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

        public static void npositions​(long struct,
                                      java.nio.FloatBuffer value)
        Unsafe version of positions.
      • nnormals

        public static void nnormals​(long struct,
                                    @Nullable
                                    java.nio.FloatBuffer value)
        Unsafe version of normals.
      • ntexcoords

        public static void ntexcoords​(long struct,
                                      @Nullable
                                      java.nio.FloatBuffer value)
        Unsafe version of texcoords.
      • nindices

        public static void nindices​(long struct,
                                    java.nio.ShortBuffer value)
        Unsafe version of indices.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate