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.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.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
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 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.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()Returnssizeof(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.
-
-
-
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:org.lwjgl.system.StructReturnssizeof(struct).- Specified by:
sizeofin classorg.lwjgl.system.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
-
create
public static ParShapesMesh create(long address)
Returns a newParShapesMeshinstance for the specified memory address ornullif the address isNULL.
-
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
-
-