Package com.raylib
Class Mesh
java.lang.Object
com.raylib.Mesh
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionMesh()
Construct with auto memory allocator and fields initialized to zero.Mesh
(int vertexCount, int triangleCount, FloatBuffer vertices, FloatBuffer texcoords, FloatBuffer texcoords2, FloatBuffer normals, FloatBuffer tangents, ByteBuffer colors, MemorySegment indices, FloatBuffer animVertices, FloatBuffer animNormals, ByteBuffer boneIds, FloatBuffer boneWeights, int vaoId, MemorySegment vboId) Construct with auto memory allocator and fields initialized as specifiedMesh
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectMesh
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedMesh
(SegmentAllocator arena, int vertexCount, int triangleCount, FloatBuffer vertices, FloatBuffer texcoords, FloatBuffer texcoords2, FloatBuffer normals, FloatBuffer tangents, ByteBuffer colors, MemorySegment indices, FloatBuffer animVertices, FloatBuffer animNormals, ByteBuffer boneIds, FloatBuffer boneWeights, int vaoId, MemorySegment vboId) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Mesh
allocateArray
(long elementCount) Allocate an array of Meshstatic Mesh
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Meshboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalAnimated normals (after bones transformations)Animated vertex positions (after bones transformations)getArrayElement
(int index) Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)Vertex bone weight, up to 4 bones influence by vertex (skinning)Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)Vertex indices (in case vertex data comes indexed)Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)int
Number of triangles stored (indexed or not)int
getVaoId()
OpenGL Vertex Array Object idgetVboId()
OpenGL Vertex Buffer Objects id (default vertex data)int
Number of vertices stored in arraysVertex position (XYZ - 3 components per vertex) (shader-location = 0)int
hashCode()
setAnimNormals
(FloatBuffer value) Animated normals (after bones transformations)setAnimVertices
(FloatBuffer value) Animated vertex positions (after bones transformations)setBoneIds
(ByteBuffer value) Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)setBoneWeights
(FloatBuffer value) Vertex bone weight, up to 4 bones influence by vertex (skinning)setColors
(ByteBuffer value) Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)setIndices
(MemorySegment value) Vertex indices (in case vertex data comes indexed)setNormals
(FloatBuffer value) Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)setTangents
(FloatBuffer value) Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)setTexcoords
(FloatBuffer value) Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)setTexcoords2
(FloatBuffer value) Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)setTriangleCount
(int value) Number of triangles stored (indexed or not)setVaoId
(int value) OpenGL Vertex Array Object idsetVboId
(MemorySegment value) OpenGL Vertex Buffer Objects id (default vertex data)setVertexCount
(int value) Number of vertices stored in arrayssetVertices
(FloatBuffer value) Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Mesh
public Mesh()Construct with auto memory allocator and fields initialized to zero. -
Mesh
Construct with your owm memory allocator and fields not initialized -
Mesh
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Mesh
public Mesh(int vertexCount, int triangleCount, FloatBuffer vertices, FloatBuffer texcoords, FloatBuffer texcoords2, FloatBuffer normals, FloatBuffer tangents, ByteBuffer colors, MemorySegment indices, FloatBuffer animVertices, FloatBuffer animNormals, ByteBuffer boneIds, FloatBuffer boneWeights, int vaoId, MemorySegment vboId) Construct with auto memory allocator and fields initialized as specified- Parameters:
vertexCount
- Number of vertices stored in arraystriangleCount
- Number of triangles stored (indexed or not)vertices
- Vertex position (XYZ - 3 components per vertex) (shader-location = 0)texcoords
- Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)texcoords2
- Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)normals
- Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)tangents
- Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)colors
- Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)indices
- Vertex indices (in case vertex data comes indexed)animVertices
- Animated vertex positions (after bones transformations)animNormals
- Animated normals (after bones transformations)boneIds
- Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)boneWeights
- Vertex bone weight, up to 4 bones influence by vertex (skinning)vaoId
- OpenGL Vertex Array Object idvboId
- OpenGL Vertex Buffer Objects id (default vertex data)
-
Mesh
public Mesh(SegmentAllocator arena, int vertexCount, int triangleCount, FloatBuffer vertices, FloatBuffer texcoords, FloatBuffer texcoords2, FloatBuffer normals, FloatBuffer tangents, ByteBuffer colors, MemorySegment indices, FloatBuffer animVertices, FloatBuffer animNormals, ByteBuffer boneIds, FloatBuffer boneWeights, int vaoId, MemorySegment vboId) Construct with your own memory allocator and fields initialized as specified- Parameters:
vertexCount
- Number of vertices stored in arraystriangleCount
- Number of triangles stored (indexed or not)vertices
- Vertex position (XYZ - 3 components per vertex) (shader-location = 0)texcoords
- Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)texcoords2
- Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)normals
- Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)tangents
- Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)colors
- Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)indices
- Vertex indices (in case vertex data comes indexed)animVertices
- Animated vertex positions (after bones transformations)animNormals
- Animated normals (after bones transformations)boneIds
- Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)boneWeights
- Vertex bone weight, up to 4 bones influence by vertex (skinning)vaoId
- OpenGL Vertex Array Object idvboId
- OpenGL Vertex Buffer Objects id (default vertex data)
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Mesh -
allocateArray
Allocate an array of Mesh -
getVertexCount
public int getVertexCount()Number of vertices stored in arrays -
setVertexCount
Number of vertices stored in arrays -
getTriangleCount
public int getTriangleCount()Number of triangles stored (indexed or not) -
setTriangleCount
Number of triangles stored (indexed or not) -
getVertices
Vertex position (XYZ - 3 components per vertex) (shader-location = 0) -
setVertices
Vertex position (XYZ - 3 components per vertex) (shader-location = 0) -
getTexcoords
Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) -
setTexcoords
Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) -
getTexcoords2
Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) -
setTexcoords2
Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) -
getNormals
Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) -
setNormals
Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) -
getTangents
Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) -
setTangents
Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) -
getColors
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) -
setColors
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) -
getIndices
Vertex indices (in case vertex data comes indexed) -
setIndices
Vertex indices (in case vertex data comes indexed) -
getAnimVertices
Animated vertex positions (after bones transformations) -
setAnimVertices
Animated vertex positions (after bones transformations) -
getAnimNormals
Animated normals (after bones transformations) -
setAnimNormals
Animated normals (after bones transformations) -
getBoneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) -
setBoneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) -
getBoneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) -
setBoneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) -
getVaoId
public int getVaoId()OpenGL Vertex Array Object id -
setVaoId
OpenGL Vertex Array Object id -
getVboId
OpenGL Vertex Buffer Objects id (default vertex data) -
setVboId
OpenGL Vertex Buffer Objects id (default vertex data)
-