@EqualityStructural public final class KMesh extends Object implements KMeshReadableType, com.io7m.jcanephora.JCGLResourceUsableType, com.io7m.jcanephora.JCGLResourceSizedType
A polygon mesh on the GPU.
The polygon mesh is expected to have the following type(s):
KMeshAttributes.ATTRIBUTE_POSITION
.KMeshAttributes.ATTRIBUTE_NORMAL
.KMeshAttributes.ATTRIBUTE_UV
.KMeshAttributes.ATTRIBUTE_TANGENT4
.Modifier and Type | Method and Description |
---|---|
<G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> |
delete(G gc)
Delete the mesh.
|
boolean |
equals(Object obj) |
static com.io7m.jcanephora.ArrayDescriptor |
getStandardDescriptor() |
int |
hashCode() |
com.io7m.jcanephora.ArrayBufferUsableType |
meshGetArrayBuffer() |
com.io7m.jcanephora.IndexBufferUsableType |
meshGetIndexBuffer() |
static KMesh |
newMesh(com.io7m.jcanephora.ArrayBufferType in_array,
com.io7m.jcanephora.IndexBufferType in_indices)
Construct a new mesh.
|
long |
resourceGetSizeBytes() |
boolean |
resourceIsDeleted() |
public static com.io7m.jcanephora.ArrayDescriptor getStandardDescriptor()
public static KMesh newMesh(com.io7m.jcanephora.ArrayBufferType in_array, com.io7m.jcanephora.IndexBufferType in_indices) throws RExceptionMeshMissingUVs, RExceptionMeshMissingNormals, RExceptionMeshMissingTangents, RExceptionMeshMissingPositions
in_array
- The array buffer of vertex datain_indices
- The index bufferRExceptionMeshMissingTangents
- If the array does not have tangent vectors.RExceptionMeshMissingNormals
- If the array does not have normal vectors.RExceptionMeshMissingUVs
- If the array does not have UV coordinates.RExceptionMeshMissingPositions
- If the array does not have positions.public <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> void delete(G gc) throws com.io7m.jcanephora.JCGLException
G
- The OpenGL capabilities requiredgc
- The OpenGL interfacecom.io7m.jcanephora.JCGLException
- If an OpenGL error occurspublic com.io7m.jcanephora.ArrayBufferUsableType meshGetArrayBuffer()
meshGetArrayBuffer
in interface KMeshReadableType
public com.io7m.jcanephora.IndexBufferUsableType meshGetIndexBuffer()
meshGetIndexBuffer
in interface KMeshReadableType
public long resourceGetSizeBytes()
resourceGetSizeBytes
in interface com.io7m.jcanephora.JCGLResourceSizedType
public boolean resourceIsDeleted()
resourceIsDeleted
in interface com.io7m.jcanephora.JCGLResourceUsableType
Copyright © 2015 <code@io7m.com> http://io7m.com