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:
- java.lang.AutoCloseable, NativeResource, Pointer
public class ParShapesMesh extends Struct
Thepar_shapes.hmesh structure.Member documentation
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
Layout
struct par_shapes_mesh { float * points; int npoints; PAR_SHAPES_T * triangles; int ntriangles; float * normals; float * tcoords; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classParShapesMesh.BufferAn array ofParShapesMeshstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and Description static ParShapesMeshcalloc()Returns a newParShapesMeshinstance allocated withmemCalloc.static ParShapesMesh.Buffercalloc(int capacity)Returns a newParShapesMesh.Bufferinstance allocated withmemCalloc.static ParShapesMeshcallocStack()Returns a newParShapesMeshinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ParShapesMesh.BuffercallocStack(int capacity)Returns a newParShapesMesh.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ParShapesMesh.BuffercallocStack(int capacity, MemoryStack stack)Returns a newParShapesMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParShapesMeshcallocStack(MemoryStack stack)Returns a newParShapesMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ParShapesMeshcreate()Returns a newParShapesMeshinstance allocated withBufferUtils.static ParShapesMesh.Buffercreate(int capacity)Returns a newParShapesMesh.Bufferinstance allocated withBufferUtils.static ParShapesMeshcreate(long address)Returns a newParShapesMeshinstance for the specified memory address ornullif the address isNULL.static ParShapesMesh.Buffercreate(long address, int capacity)Create aParShapesMesh.Bufferinstance at the specified memory.static ParShapesMeshmalloc()Returns a newParShapesMeshinstance allocated withmemAlloc.static ParShapesMesh.Buffermalloc(int capacity)Returns a newParShapesMesh.Bufferinstance allocated withmemAlloc.static ParShapesMeshmallocStack()Returns a newParShapesMeshinstance allocated on the thread-localMemoryStack.static ParShapesMesh.BuffermallocStack(int capacity)Returns a newParShapesMesh.Bufferinstance allocated on the thread-localMemoryStack.static ParShapesMesh.BuffermallocStack(int capacity, MemoryStack stack)Returns a newParShapesMesh.Bufferinstance allocated on the specifiedMemoryStack.static ParShapesMeshmallocStack(MemoryStack stack)Returns a newParShapesMeshinstance allocated on the specifiedMemoryStack.java.nio.FloatBuffernormals(int capacity)Returns aFloatBufferview of the data pointed to by thenormalsfield.intnpoints()Returns the value of thenpointsfield.intntriangles()Returns the value of thentrianglesfield.java.nio.FloatBufferpoints(int capacity)Returns aFloatBufferview of the data pointed to by thepointsfield.intsizeof()Returns thesizeof(struct).java.nio.FloatBuffertcoords(int capacity)Returns aFloatBufferview of the data pointed to by thetcoordsfield.java.nio.ShortBuffertriangles(int capacity)Returns aShortBufferview of the data pointed to by thetrianglesfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(struct).
-
points
public java.nio.FloatBuffer points(int capacity)
Returns aFloatBufferview of the data pointed to by thepointsfield.- Parameters:
capacity- the number of elements in the returned buffer
-
npoints
public int npoints()
Returns the value of thenpointsfield.
-
triangles
public java.nio.ShortBuffer triangles(int capacity)
Returns aShortBufferview of the data pointed to by thetrianglesfield.- Parameters:
capacity- the number of elements in the returned buffer
-
ntriangles
public int ntriangles()
Returns the value of thentrianglesfield.
-
normals
public java.nio.FloatBuffer normals(int capacity)
Returns aFloatBufferview of the data pointed to by thenormalsfield.- Parameters:
capacity- the number of elements in the returned buffer
-
tcoords
public java.nio.FloatBuffer tcoords(int capacity)
Returns aFloatBufferview of the data pointed to by thetcoordsfield.- Parameters:
capacity- the number of elements in the returned buffer
-
malloc
public static ParShapesMesh malloc()
Returns a newParShapesMeshinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ParShapesMesh calloc()
Returns a newParShapesMeshinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ParShapesMesh create()
Returns a newParShapesMeshinstance allocated withBufferUtils.
-
create
public static ParShapesMesh create(long address)
Returns a newParShapesMeshinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static ParShapesMesh.Buffer malloc(int capacity)
Returns a newParShapesMesh.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ParShapesMesh.Buffer calloc(int capacity)
Returns a newParShapesMesh.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ParShapesMesh.Buffer create(int capacity)
Returns a newParShapesMesh.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
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
-
mallocStack
public static ParShapesMesh mallocStack()
Returns a newParShapesMeshinstance allocated on the thread-localMemoryStack.
-
callocStack
public static ParShapesMesh callocStack()
Returns a newParShapesMeshinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static ParShapesMesh mallocStack(MemoryStack stack)
Returns a newParShapesMeshinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static ParShapesMesh callocStack(MemoryStack stack)
Returns a newParShapesMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static ParShapesMesh.Buffer mallocStack(int capacity)
Returns a newParShapesMesh.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static ParShapesMesh.Buffer callocStack(int capacity)
Returns a newParShapesMesh.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static ParShapesMesh.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newParShapesMesh.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static ParShapesMesh.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newParShapesMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-