Package org.lwjgl.util.par
Class ParOctasphereMesh
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionParOctasphereMesh
(ByteBuffer container) Creates aParOctasphereMesh
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParOctasphereMesh
calloc()
Returns a newParOctasphereMesh
instance allocated withmemCalloc
.static ParOctasphereMesh.Buffer
calloc
(int capacity) Returns a newParOctasphereMesh.Buffer
instance allocated withmemCalloc
.static ParOctasphereMesh.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newParOctasphereMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParOctasphereMesh
calloc
(MemoryStack stack) Returns a newParOctasphereMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ParOctasphereMesh
create()
Returns a newParOctasphereMesh
instance allocated withBufferUtils
.static ParOctasphereMesh.Buffer
create
(int capacity) Returns a newParOctasphereMesh.Buffer
instance allocated withBufferUtils
.static ParOctasphereMesh
create
(long address) Returns a newParOctasphereMesh
instance for the specified memory address.static ParOctasphereMesh.Buffer
create
(long address, int capacity) Create aParOctasphereMesh.Buffer
instance at the specified memory.static @Nullable ParOctasphereMesh
createSafe
(long address) static @Nullable ParOctasphereMesh.Buffer
createSafe
(long address, int capacity) indices
(int capacity) indices
(ShortBuffer value) Sets the address of the specifiedShortBuffer
to theindices
field.static ParOctasphereMesh
malloc()
Returns a newParOctasphereMesh
instance allocated withmemAlloc
.static ParOctasphereMesh.Buffer
malloc
(int capacity) Returns a newParOctasphereMesh.Buffer
instance allocated withmemAlloc
.static ParOctasphereMesh.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newParOctasphereMesh.Buffer
instance allocated on the specifiedMemoryStack
.static ParOctasphereMesh
malloc
(MemoryStack stack) Returns a newParOctasphereMesh
instance allocated on the specifiedMemoryStack
.static ShortBuffer
nindices
(long struct, int capacity) Unsafe version ofindices
.static void
nindices
(long struct, ShortBuffer value) Unsafe version ofindices
.static @Nullable FloatBuffer
nnormals
(long struct, int capacity) Unsafe version ofnormals
.static void
nnormals
(long struct, @Nullable FloatBuffer value) Unsafe version ofnormals
.static int
nnum_indices
(long struct) Unsafe version ofnum_indices()
.static int
nnum_vertices
(long struct) Unsafe version ofnum_vertices()
.@Nullable FloatBuffer
normals
(int capacity) normals
(@Nullable FloatBuffer value) Sets the address of the specifiedFloatBuffer
to thenormals
field.static FloatBuffer
npositions
(long struct, int capacity) Unsafe version ofpositions
.static void
npositions
(long struct, FloatBuffer value) Unsafe version ofpositions
.static @Nullable FloatBuffer
ntexcoords
(long struct, int capacity) Unsafe version oftexcoords
.static void
ntexcoords
(long struct, @Nullable FloatBuffer value) Unsafe version oftexcoords
.int
int
positions
(int capacity) positions
(FloatBuffer value) Sets the address of the specifiedFloatBuffer
to thepositions
field.set
(FloatBuffer positions, @Nullable FloatBuffer normals, @Nullable FloatBuffer texcoords, ShortBuffer indices) Initializes this struct with the specified values.set
(ParOctasphereMesh src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.@Nullable FloatBuffer
texcoords
(int capacity) texcoords
(@Nullable FloatBuffer value) Sets the address of the specifiedFloatBuffer
to thetexcoords
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
POSITIONS
public static final int POSITIONSThe struct member offsets. -
NORMALS
public static final int NORMALSThe struct member offsets. -
TEXCOORDS
public static final int TEXCOORDSThe struct member offsets. -
INDICES
public static final int INDICESThe struct member offsets. -
NUM_INDICES
public static final int NUM_INDICESThe struct member offsets. -
NUM_VERTICES
public static final int NUM_VERTICESThe struct member offsets.
-
-
Constructor Details
-
ParOctasphereMesh
Creates aParOctasphereMesh
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<ParOctasphereMesh>
-
positions
- Returns:
- a
FloatBuffer
view of the data pointed to by thepositions
field.
-
normals
- Returns:
- a
FloatBuffer
view of the data pointed to by thenormals
field.
-
texcoords
- Returns:
- a
FloatBuffer
view of the data pointed to by thetexcoords
field.
-
indices
- Returns:
- a
ShortBuffer
view of the data pointed to by theindices
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
Sets the address of the specifiedFloatBuffer
to thepositions
field. -
normals
Sets the address of the specifiedFloatBuffer
to thenormals
field. -
texcoords
Sets the address of the specifiedFloatBuffer
to thetexcoords
field. -
indices
Sets the address of the specifiedShortBuffer
to theindices
field. -
set
public ParOctasphereMesh set(FloatBuffer positions, @Nullable FloatBuffer normals, @Nullable FloatBuffer texcoords, ShortBuffer indices) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newParOctasphereMesh
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newParOctasphereMesh
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newParOctasphereMesh
instance allocated withBufferUtils
. -
create
Returns a newParOctasphereMesh
instance for the specified memory address. -
createSafe
-
malloc
Returns a newParOctasphereMesh.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newParOctasphereMesh.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newParOctasphereMesh.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aParOctasphereMesh.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newParOctasphereMesh
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newParOctasphereMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newParOctasphereMesh.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newParOctasphereMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
npositions
Unsafe version ofpositions
. -
nnormals
Unsafe version ofnormals
. -
ntexcoords
Unsafe version oftexcoords
. -
nindices
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
Unsafe version ofpositions
. -
nnormals
Unsafe version ofnormals
. -
ntexcoords
Unsafe version oftexcoords
. -
nindices
Unsafe version ofindices
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-