Package org.lwjgl.util.par
Class ParOctasphereMesh
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.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.NativeResourceLayout
struct par_octasphere_mesh { float * positions; float * normals; float * texcoords; uint16_t * indices; uint32_t num_indices; uint32_t num_vertices; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParOctasphereMesh.BufferAn array ofParOctasphereMeshstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intINDICES
NORMALS
NUM_INDICES
NUM_VERTICES
POSITIONSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTEXCOORDSThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ParOctasphereMesh(java.nio.ByteBuffer container)Creates aParOctasphereMeshinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParOctasphereMeshcalloc()Returns a newParOctasphereMeshinstance allocated withmemCalloc.static ParOctasphereMesh.Buffercalloc(int capacity)Returns a newParOctasphereMesh.Bufferinstance allocated withmemCalloc.static ParOctasphereMesh.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParOctasphereMeshcalloc(org.lwjgl.system.MemoryStack stack)Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParOctasphereMeshcreate()Returns a newParOctasphereMeshinstance allocated withBufferUtils.static ParOctasphereMesh.Buffercreate(int capacity)Returns a newParOctasphereMesh.Bufferinstance allocated withBufferUtils.static ParOctasphereMeshcreate(long address)Returns a newParOctasphereMeshinstance for the specified memory address.static ParOctasphereMesh.Buffercreate(long address, int capacity)Create aParOctasphereMesh.Bufferinstance at the specified memory.static ParOctasphereMeshcreateSafe(long address)static ParOctasphereMesh.BuffercreateSafe(long address, int capacity)java.nio.ShortBufferindices(int capacity)ParOctasphereMeshindices(java.nio.ShortBuffer value)Sets the address of the specifiedShortBufferto theindicesfield.static ParOctasphereMeshmalloc()Returns a newParOctasphereMeshinstance allocated withmemAlloc.static ParOctasphereMesh.Buffermalloc(int capacity)Returns a newParOctasphereMesh.Bufferinstance allocated withmemAlloc.static ParOctasphereMesh.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStack.static ParOctasphereMeshmalloc(org.lwjgl.system.MemoryStack stack)Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStack.static java.nio.ShortBuffernindices(long struct, int capacity)Unsafe version ofindices.static voidnindices(long struct, java.nio.ShortBuffer value)Unsafe version ofindices.static java.nio.FloatBuffernnormals(long struct, int capacity)Unsafe version ofnormals.static voidnnormals(long struct, java.nio.FloatBuffer value)Unsafe version ofnormals.static intnnum_indices(long struct)Unsafe version ofnum_indices().static intnnum_vertices(long struct)Unsafe version ofnum_vertices().java.nio.FloatBuffernormals(int capacity)ParOctasphereMeshnormals(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto thenormalsfield.static java.nio.FloatBuffernpositions(long struct, int capacity)Unsafe version ofpositions.static voidnpositions(long struct, java.nio.FloatBuffer value)Unsafe version ofpositions.static java.nio.FloatBufferntexcoords(long struct, int capacity)Unsafe version oftexcoords.static voidntexcoords(long struct, java.nio.FloatBuffer value)Unsafe version oftexcoords.intnum_indices()intnum_vertices()java.nio.FloatBufferpositions(int capacity)ParOctasphereMeshpositions(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto thepositionsfield.ParOctasphereMeshset(java.nio.FloatBuffer positions, java.nio.FloatBuffer normals, java.nio.FloatBuffer texcoords, java.nio.ShortBuffer indices)Initializes this struct with the specified values.ParOctasphereMeshset(ParOctasphereMesh src)Copies the specified struct data to this struct.intsizeof()java.nio.FloatBuffertexcoords(int capacity)ParOctasphereMeshtexcoords(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto thetexcoordsfield.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
ParOctasphereMesh
public ParOctasphereMesh(java.nio.ByteBuffer container)
Creates aParOctasphereMeshinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
positions
public java.nio.FloatBuffer positions(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
FloatBufferview of the data pointed to by thepositionsfield.
-
normals
@Nullable public java.nio.FloatBuffer normals(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
FloatBufferview of the data pointed to by thenormalsfield.
-
texcoords
@Nullable public java.nio.FloatBuffer texcoords(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
FloatBufferview of the data pointed to by thetexcoordsfield.
-
indices
public java.nio.ShortBuffer indices(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
ShortBufferview of the data pointed to by theindicesfield.
-
num_indices
public int num_indices()
- Returns:
- the value of the
num_indicesfield.
-
num_vertices
public int num_vertices()
- Returns:
- the value of the
num_verticesfield.
-
positions
public ParOctasphereMesh positions(java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBufferto thepositionsfield.
-
normals
public ParOctasphereMesh normals(@Nullable java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBufferto thenormalsfield.
-
texcoords
public ParOctasphereMesh texcoords(@Nullable java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBufferto thetexcoordsfield.
-
indices
public ParOctasphereMesh indices(java.nio.ShortBuffer value)
Sets the address of the specifiedShortBufferto theindicesfield.
-
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.
-
set
public ParOctasphereMesh set(ParOctasphereMesh src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static ParOctasphereMesh malloc()
Returns a newParOctasphereMeshinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ParOctasphereMesh calloc()
Returns a newParOctasphereMeshinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ParOctasphereMesh create()
Returns a newParOctasphereMeshinstance allocated withBufferUtils.
-
create
public static ParOctasphereMesh create(long address)
Returns a newParOctasphereMeshinstance for the specified memory address.
-
createSafe
@Nullable public static ParOctasphereMesh createSafe(long address)
-
malloc
public static ParOctasphereMesh.Buffer malloc(int capacity)
Returns a newParOctasphereMesh.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ParOctasphereMesh.Buffer calloc(int capacity)
Returns a newParOctasphereMesh.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ParOctasphereMesh.Buffer create(int capacity)
Returns a newParOctasphereMesh.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ParOctasphereMesh.Buffer create(long address, int capacity)
Create aParOctasphereMesh.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ParOctasphereMesh.Buffer createSafe(long address, int capacity)
-
malloc
public static ParOctasphereMesh malloc(org.lwjgl.system.MemoryStack stack)
Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static ParOctasphereMesh calloc(org.lwjgl.system.MemoryStack stack)
Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStackand 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 newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static ParOctasphereMesh.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
npositions
public static java.nio.FloatBuffer npositions(long struct, int capacity)Unsafe version ofpositions.
-
nnormals
@Nullable public static java.nio.FloatBuffer nnormals(long struct, int capacity)Unsafe version ofnormals.
-
ntexcoords
@Nullable public static java.nio.FloatBuffer ntexcoords(long struct, int capacity)Unsafe version oftexcoords.
-
nindices
public static java.nio.ShortBuffer nindices(long struct, int capacity)Unsafe version ofindices.
-
nnum_indices
public static int nnum_indices(long struct)
Unsafe version ofnum_indices().
-
nnum_vertices
public static int nnum_vertices(long struct)
Unsafe version ofnum_vertices().
-
npositions
public static void npositions(long struct, java.nio.FloatBuffer value)Unsafe version ofpositions.
-
nnormals
public static void nnormals(long struct, @Nullable java.nio.FloatBuffer value)Unsafe version ofnormals.
-
ntexcoords
public static void ntexcoords(long struct, @Nullable java.nio.FloatBuffer value)Unsafe version oftexcoords.
-
nindices
public static void nindices(long struct, java.nio.ShortBuffer value)Unsafe version ofindices.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-