public class ParShapesMesh
extends org.lwjgl.system.Struct
par_shapes.h mesh structure.
LWJGL note: in the default build, PAR_SHAPES_T is uint32_t.
points – a flat list of 3-tuples (X Y Z X Y Z...) for the vertex positionsnpoints – the number of pointstriangles – flat list of 3-tuples (I J K I J K...)ntriangles – the number of trianglesnormals – an optional list of 3-tuples (X Y Z X Y Z...) for the vertex normalstcoords – an optional list of 2-tuples (U V U V U V...) for the vertex texture coordinates
struct par_shapes_mesh {
float * points;
int npoints;
PAR_SHAPES_T * triangles;
int ntriangles;
float * normals;
float * tcoords;
}| Modifier and Type | Class and Description |
|---|---|
static class |
ParShapesMesh.Buffer
An array of
ParShapesMesh structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
NORMALS
The struct member offsets.
|
static int |
NPOINTS
The struct member offsets.
|
static int |
NTRIANGLES
The struct member offsets.
|
static int |
POINTS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TCOORDS
The struct member offsets.
|
static int |
TRIANGLES
The struct member offsets.
|
| Constructor and Description |
|---|
ParShapesMesh(java.nio.ByteBuffer container)
Creates a
ParShapesMesh instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static ParShapesMesh |
create(long address)
Returns a new
ParShapesMesh instance for the specified memory address. |
static ParShapesMesh.Buffer |
create(long address,
int capacity)
Create a
ParShapesMesh.Buffer instance at the specified memory. |
static ParShapesMesh |
createSafe(long address)
|
static ParShapesMesh.Buffer |
createSafe(long address,
int capacity)
|
static java.nio.FloatBuffer |
nnormals(long struct,
int capacity)
Unsafe version of
normals. |
static int |
nnpoints(long struct)
Unsafe version of
npoints(). |
static int |
nntriangles(long struct)
Unsafe version of
ntriangles(). |
java.nio.FloatBuffer |
normals(int capacity)
Returns a
FloatBuffer view of the data pointed to by the normals field. |
int |
npoints()
Returns the value of the
npoints field. |
static java.nio.FloatBuffer |
npoints(long struct,
int capacity)
Unsafe version of
points. |
static java.nio.FloatBuffer |
ntcoords(long struct,
int capacity)
Unsafe version of
tcoords. |
int |
ntriangles()
Returns the value of the
ntriangles field. |
static java.nio.IntBuffer |
ntriangles(long struct,
int capacity)
Unsafe version of
triangles. |
java.nio.FloatBuffer |
points(int capacity)
Returns a
FloatBuffer view of the data pointed to by the points field. |
int |
sizeof() |
java.nio.FloatBuffer |
tcoords(int capacity)
Returns a
FloatBuffer view of the data pointed to by the tcoords field. |
java.nio.IntBuffer |
triangles(int capacity)
Returns a
IntBuffer view of the data pointed to by the triangles field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int POINTS
public static final int NPOINTS
public static final int TRIANGLES
public static final int NTRIANGLES
public static final int NORMALS
public static final int TCOORDS
public ParShapesMesh(java.nio.ByteBuffer container)
ParShapesMesh instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.FloatBuffer points(int capacity)
FloatBuffer view of the data pointed to by the points field.capacity - the number of elements in the returned bufferpublic int npoints()
npoints field.public java.nio.IntBuffer triangles(int capacity)
IntBuffer view of the data pointed to by the triangles field.capacity - the number of elements in the returned bufferpublic int ntriangles()
ntriangles field.@Nullable public java.nio.FloatBuffer normals(int capacity)
FloatBuffer view of the data pointed to by the normals field.capacity - the number of elements in the returned buffer@Nullable public java.nio.FloatBuffer tcoords(int capacity)
FloatBuffer view of the data pointed to by the tcoords field.capacity - the number of elements in the returned bufferpublic static ParShapesMesh create(long address)
ParShapesMesh instance for the specified memory address.@Nullable public static ParShapesMesh createSafe(long address)
public static ParShapesMesh.Buffer create(long address, int capacity)
ParShapesMesh.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static ParShapesMesh.Buffer createSafe(long address, int capacity)
public static java.nio.FloatBuffer npoints(long struct,
int capacity)
points.public static int nnpoints(long struct)
npoints().public static java.nio.IntBuffer ntriangles(long struct,
int capacity)
triangles.public static int nntriangles(long struct)
ntriangles().@Nullable
public static java.nio.FloatBuffer nnormals(long struct,
int capacity)
normals.@Nullable
public static java.nio.FloatBuffer ntcoords(long struct,
int capacity)
tcoords.Copyright LWJGL. All Rights Reserved. License terms.