Package org.lwjgl.util.par
Class ParShapesMesh
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.par.ParShapesMesh
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class ParShapesMesh extends org.lwjgl.system.StructThepar_shapes.hmesh structure.LWJGL note: in the default build,
PAR_SHAPES_Tisuint32_t.Layout
struct par_shapes_mesh { float *points(int); intnpoints(); PAR_SHAPES_T *triangles(int); intntriangles(); float *normals(int); float *tcoords(int); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParShapesMesh.BufferAn array ofParShapesMeshstructs.
-
Constructor Summary
Constructors Constructor Description ParShapesMesh(java.nio.ByteBuffer container)Creates aParShapesMeshinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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 ParShapesMeshcreateSafe(long address)static ParShapesMesh.BuffercreateSafe(long address, int capacity)static java.nio.FloatBuffernnormals(long struct, int capacity)Unsafe version ofnormals.static intnnpoints(long struct)Unsafe version ofnpoints().static intnntriangles(long struct)Unsafe version ofntriangles().java.nio.FloatBuffernormals(int capacity)intnpoints()the number of pointsstatic java.nio.FloatBuffernpoints(long struct, int capacity)Unsafe version ofpoints.static java.nio.FloatBufferntcoords(long struct, int capacity)Unsafe version oftcoords.intntriangles()the number of trianglesstatic java.nio.IntBufferntriangles(long struct, int capacity)Unsafe version oftriangles.java.nio.FloatBufferpoints(int capacity)intsizeof()java.nio.FloatBuffertcoords(int capacity)java.nio.IntBuffertriangles(int capacity)
-
-
-
Constructor Detail
-
ParShapesMesh
public ParShapesMesh(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
points
public java.nio.FloatBuffer points(int capacity)
- 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
public java.nio.IntBuffer triangles(int capacity)
- 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
@Nullable public java.nio.FloatBuffer normals(int capacity)
- 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
@Nullable public java.nio.FloatBuffer tcoords(int capacity)
- 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
public static ParShapesMesh create(long address)
Returns a newParShapesMeshinstance for the specified memory address.
-
createSafe
@Nullable public static ParShapesMesh createSafe(long address)
-
create
public static ParShapesMesh.Buffer create(long address, int capacity)
Create aParShapesMesh.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ParShapesMesh.Buffer createSafe(long address, int capacity)
-
npoints
public static java.nio.FloatBuffer npoints(long struct, int capacity)Unsafe version ofpoints.
-
nnpoints
public static int nnpoints(long struct)
Unsafe version ofnpoints().
-
ntriangles
public static java.nio.IntBuffer ntriangles(long struct, int capacity)Unsafe version oftriangles.
-
nntriangles
public static int nntriangles(long struct)
Unsafe version ofntriangles().
-
nnormals
@Nullable public static java.nio.FloatBuffer nnormals(long struct, int capacity)Unsafe version ofnormals.
-
ntcoords
@Nullable public static java.nio.FloatBuffer ntcoords(long struct, int capacity)Unsafe version oftcoords.
-
-