Package org.lwjgl.util.par
Class ParShapesMesh
- All Implemented Interfaces:
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 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
Modifier 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 size in bytes.static final int
The struct member offsets.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
ConstructorDescriptionParShapesMesh
(ByteBuffer container) Creates aParShapesMesh
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParShapesMesh
create
(long address) Returns a newParShapesMesh
instance for the specified memory address.static ParShapesMesh.Buffer
create
(long address, int capacity) Create aParShapesMesh.Buffer
instance at the specified memory.static ParShapesMesh
createSafe
(long address) static ParShapesMesh.Buffer
createSafe
(long address, int capacity) static FloatBuffer
nnormals
(long struct, int capacity) Unsafe version ofnormals
.static int
nnpoints
(long struct) Unsafe version ofnpoints()
.static int
nntriangles
(long struct) Unsafe version ofntriangles()
.normals
(int capacity) int
npoints()
the number of pointsstatic FloatBuffer
npoints
(long struct, int capacity) Unsafe version ofpoints
.static FloatBuffer
ntcoords
(long struct, int capacity) Unsafe version oftcoords
.int
the number of trianglesstatic IntBuffer
ntriangles
(long struct, int capacity) Unsafe version oftriangles
.points
(int capacity) int
sizeof()
Returnssizeof(struct)
.tcoords
(int capacity) triangles
(int capacity) Methods 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 aParShapesMesh
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<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 newParShapesMesh
instance for the specified memory address. -
createSafe
-
create
Create aParShapesMesh.Buffer
instance 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
.
-