Package org.lwjgl.util.par
Class ParShapesMesh
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ParShapesMesh>
org.lwjgl.util.par.ParShapesMesh
- All Implemented Interfaces:
org.lwjgl.system.Pointer
The
par_shapes.h mesh structure.
LWJGL note: in the default build, PAR_SHAPES_T is uint32_t.
Layout
struct par_shapes_mesh {
float * points(int);
int npoints();
PAR_SHAPES_T * triangles(int);
int ntriangles();
float * normals(int);
float * tcoords(int);
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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 size in bytes.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionParShapesMesh(ByteBuffer container) Creates aParShapesMeshinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParShapesMeshcreate(long address) Returns a newParShapesMeshinstance for the specified memory address.static ParShapesMesh.Buffercreate(long address, int capacity) Create aParShapesMesh.Bufferinstance at the specified memory.static @Nullable ParShapesMeshcreateSafe(long address) static @Nullable ParShapesMesh.BuffercreateSafe(long address, int capacity) static @Nullable FloatBuffernnormals(long struct, int capacity) Unsafe version ofnormals.static intnnpoints(long struct) Unsafe version ofnpoints().static intnntriangles(long struct) Unsafe version ofntriangles().@Nullable FloatBuffernormals(int capacity) intnpoints()the number of pointsstatic FloatBuffernpoints(long struct, int capacity) Unsafe version ofpoints.static @Nullable FloatBufferntcoords(long struct, int capacity) Unsafe version oftcoords.intthe number of trianglesstatic IntBufferntriangles(long struct, int capacity) Unsafe version oftriangles.points(int capacity) intsizeof()@Nullable FloatBuffertcoords(int capacity) triangles(int capacity) Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
POINTS
public static final int POINTSThe struct member offsets. -
NPOINTS
public static final int NPOINTSThe struct member offsets. -
TRIANGLES
public static final int TRIANGLESThe struct member offsets. -
NTRIANGLES
public static final int NTRIANGLESThe struct member offsets. -
NORMALS
public static final int NORMALSThe struct member offsets. -
TCOORDS
public static final int TCOORDSThe struct member offsets.
-
-
Constructor Details
-
ParShapesMesh
Creates aParShapesMeshinstance 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<ParShapesMesh>
-
points
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a flat list of 3-tuples (X Y Z X Y Z...) for the vertex positions
-
npoints
public int npoints()the number of points -
triangles
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- flat list of 3-tuples (I J K I J K...)
-
ntriangles
public int ntriangles()the number of triangles -
normals
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- an optional list of 3-tuples (X Y Z X Y Z...) for the vertex normals
-
tcoords
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- an optional list of 2-tuples (U V U V U V...) for the vertex texture coordinates
-
create
Returns a newParShapesMeshinstance for the specified memory address. -
createSafe
-
create
Create aParShapesMesh.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
npoints
Unsafe version ofpoints. -
nnpoints
public static int nnpoints(long struct) Unsafe version ofnpoints(). -
ntriangles
Unsafe version oftriangles. -
nntriangles
public static int nntriangles(long struct) Unsafe version ofntriangles(). -
nnormals
Unsafe version ofnormals. -
ntcoords
Unsafe version oftcoords.
-