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.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe 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 aParOctasphereMeshinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParOctasphereMeshcalloc()Returns a newParOctasphereMeshinstance allocated withmemCalloc.static ParOctasphereMesh.Buffercalloc(int capacity) Returns a newParOctasphereMesh.Bufferinstance allocated withmemCalloc.static ParOctasphereMesh.Buffercalloc(int capacity, MemoryStack stack) Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParOctasphereMeshcalloc(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 @Nullable ParOctasphereMeshcreateSafe(long address) static @Nullable ParOctasphereMesh.BuffercreateSafe(long address, int capacity) indices(int capacity) indices(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, MemoryStack stack) Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStack.static ParOctasphereMeshmalloc(MemoryStack stack) Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStack.static ShortBuffernindices(long struct, int capacity) Unsafe version ofindices.static voidnindices(long struct, ShortBuffer value) Unsafe version ofindices.static @Nullable FloatBuffernnormals(long struct, int capacity) Unsafe version ofnormals.static voidnnormals(long struct, @Nullable FloatBuffer value) Unsafe version ofnormals.static intnnum_indices(long struct) Unsafe version ofnum_indices().static intnnum_vertices(long struct) Unsafe version ofnum_vertices().@Nullable FloatBuffernormals(int capacity) normals(@Nullable FloatBuffer value) Sets the address of the specifiedFloatBufferto thenormalsfield.static FloatBuffernpositions(long struct, int capacity) Unsafe version ofpositions.static voidnpositions(long struct, FloatBuffer value) Unsafe version ofpositions.static @Nullable FloatBufferntexcoords(long struct, int capacity) Unsafe version oftexcoords.static voidntexcoords(long struct, @Nullable FloatBuffer value) Unsafe version oftexcoords.intintpositions(int capacity) positions(FloatBuffer value) Sets the address of the specifiedFloatBufferto thepositionsfield.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.intsizeof()Returnssizeof(struct).@Nullable FloatBuffertexcoords(int capacity) texcoords(@Nullable FloatBuffer value) Sets the address of the specifiedFloatBufferto thetexcoordsfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ParOctasphereMesh>
-
positions
- Returns:
- a
FloatBufferview of the data pointed to by thepositionsfield.
-
normals
- Returns:
- a
FloatBufferview of the data pointed to by thenormalsfield.
-
texcoords
- Returns:
- a
FloatBufferview of the data pointed to by thetexcoordsfield.
-
indices
- 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
Sets the address of the specifiedFloatBufferto thepositionsfield. -
normals
Sets the address of the specifiedFloatBufferto thenormalsfield. -
texcoords
Sets the address of the specifiedFloatBufferto thetexcoordsfield. -
indices
Sets the address of the specifiedShortBufferto theindicesfield. -
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 newParOctasphereMeshinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newParOctasphereMeshinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newParOctasphereMeshinstance allocated withBufferUtils. -
create
Returns a newParOctasphereMeshinstance for the specified memory address. -
createSafe
-
malloc
Returns a newParOctasphereMesh.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newParOctasphereMesh.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newParOctasphereMesh.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aParOctasphereMesh.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newParOctasphereMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newParOctasphereMesh.Bufferinstance allocated on the specifiedMemoryStackand 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
-