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, Matrix boneMatrices, int boneCount, 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, Matrix boneMatrices, int boneCount, 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 MeshAnimated normals (after bones transformations)animNormals
(FloatBuffer value) Animated normals (after bones transformations)Animated vertex positions (after bones transformations)animVertices
(FloatBuffer value) Animated vertex positions (after bones transformations)int
Number of bonesboneCount
(int value) Number of bonesboneIds()
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)boneIds
(ByteBuffer value) Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)Bones animated transformation matricesboneMatrices
(Matrix value) Bones animated transformation matricesVertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)boneWeights
(FloatBuffer value) Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)colors()
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)colors
(ByteBuffer value) Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)boolean
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) int
Number of bonesVertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)Bones animated transformation matricesVertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)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()
indices()
Vertex indices (in case vertex data comes indexed)indices
(MemorySegment value) Vertex indices (in case vertex data comes indexed)normals()
Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)normals
(FloatBuffer value) Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)void
setAnimNormals
(FloatBuffer value) Animated normals (after bones transformations)void
setAnimVertices
(FloatBuffer value) Animated vertex positions (after bones transformations)void
setBoneCount
(int value) Number of bonesvoid
setBoneIds
(ByteBuffer value) Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)void
setBoneMatrices
(Matrix value) Bones animated transformation matricesvoid
setBoneWeights
(FloatBuffer value) Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)void
setColors
(ByteBuffer value) Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)void
setIndices
(MemorySegment value) Vertex indices (in case vertex data comes indexed)void
setNormals
(FloatBuffer value) Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)void
setTangents
(FloatBuffer value) Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)void
setTexcoords
(FloatBuffer value) Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)void
setTexcoords2
(FloatBuffer value) Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)void
setTriangleCount
(int value) Number of triangles stored (indexed or not)void
setVaoId
(int value) OpenGL Vertex Array Object idvoid
setVboId
(MemorySegment value) OpenGL Vertex Buffer Objects id (default vertex data)void
setVertexCount
(int value) Number of vertices stored in arraysvoid
setVertices
(FloatBuffer value) Vertex position (XYZ - 3 components per vertex) (shader-location = 0)tangents()
Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)tangents
(FloatBuffer value) Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)texcoords
(FloatBuffer value) Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)texcoords2
(FloatBuffer value) Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)int
Number of triangles stored (indexed or not)triangleCount
(int value) Number of triangles stored (indexed or not)int
vaoId()
OpenGL Vertex Array Object idvaoId
(int value) OpenGL Vertex Array Object idvboId()
OpenGL Vertex Buffer Objects id (default vertex data)vboId
(MemorySegment value) OpenGL Vertex Buffer Objects id (default vertex data)int
Number of vertices stored in arraysvertexCount
(int value) Number of vertices stored in arraysvertices()
Vertex position (XYZ - 3 components per vertex) (shader-location = 0)vertices
(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, Matrix boneMatrices, int boneCount, 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) (shader-location = 6)boneWeights
- Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)boneMatrices
- Bones animated transformation matricesboneCount
- Number of bonesvaoId
- 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, Matrix boneMatrices, int boneCount, 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) (shader-location = 6)boneWeights
- Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)boneMatrices
- Bones animated transformation matricesboneCount
- Number of bonesvaoId
- 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
public void setVertexCount(int value) Number of vertices stored in arrays -
vertexCount
public int vertexCount()Number of vertices stored in arrays -
vertexCount
Number of vertices stored in arrays -
getTriangleCount
public int getTriangleCount()Number of triangles stored (indexed or not) -
setTriangleCount
public void setTriangleCount(int value) Number of triangles stored (indexed or not) -
triangleCount
public int triangleCount()Number of triangles stored (indexed or not) -
triangleCount
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) -
vertices
Vertex position (XYZ - 3 components per vertex) (shader-location = 0) -
vertices
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) -
texcoords
Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) -
texcoords
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) -
texcoords2
Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5) -
texcoords2
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) -
normals
Vertex normals (XYZ - 3 components per vertex) (shader-location = 2) -
normals
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) -
tangents
Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4) -
tangents
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) -
colors
Vertex colors (RGBA - 4 components per vertex) (shader-location = 3) -
colors
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) -
indices
Vertex indices (in case vertex data comes indexed) -
indices
Vertex indices (in case vertex data comes indexed) -
getAnimVertices
Animated vertex positions (after bones transformations) -
setAnimVertices
Animated vertex positions (after bones transformations) -
animVertices
Animated vertex positions (after bones transformations) -
animVertices
Animated vertex positions (after bones transformations) -
getAnimNormals
Animated normals (after bones transformations) -
setAnimNormals
Animated normals (after bones transformations) -
animNormals
Animated normals (after bones transformations) -
animNormals
Animated normals (after bones transformations) -
getBoneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6) -
setBoneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6) -
boneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6) -
boneIds
Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6) -
getBoneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7) -
setBoneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7) -
boneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7) -
boneWeights
Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7) -
getBoneMatrices
Bones animated transformation matrices -
setBoneMatrices
Bones animated transformation matrices -
boneMatrices
Bones animated transformation matrices -
boneMatrices
-
getBoneCount
public int getBoneCount()Number of bones -
setBoneCount
public void setBoneCount(int value) Number of bones -
boneCount
public int boneCount()Number of bones -
boneCount
Number of bones -
getVaoId
public int getVaoId()OpenGL Vertex Array Object id -
setVaoId
public void setVaoId(int value) OpenGL Vertex Array Object id -
vaoId
public int vaoId()OpenGL Vertex Array Object id -
vaoId
OpenGL Vertex Array Object id -
getVboId
OpenGL Vertex Buffer Objects id (default vertex data) -
setVboId
OpenGL Vertex Buffer Objects id (default vertex data) -
vboId
OpenGL Vertex Buffer Objects id (default vertex data) -
vboId
OpenGL Vertex Buffer Objects id (default vertex data)
-