public interface ILspVertexArray
Buffer
s with vertex data, as well as a number of
ILspVertexAttribute
objects describing the structure of the buffers.
Vertex arrays are usually modified asynchronously and rendered synchronously, hence
locking
is needed.
TLspVertexArrayFactory
Modifier and Type | Method and Description |
---|---|
ILcdPoint |
getCoordinateOrigin()
Returns the point relative to which the coordinates in this vertex array
are defined.
|
Buffer |
getData(ILspVertexAttribute aVertexAttribute)
Returns the buffer that contains the data for the given
vertex attribute.
|
Buffer |
getData(int aVertexAttributeIndex)
Returns the buffer that contains the vertex array's data.
|
int |
getSize()
Returns the number of vertices in this array.
|
ILspVertexAttribute |
getVertexAttribute(int aVertexAttributeIndex)
Returns the descriptor of the specified vertex attribute.
|
int |
getVertexAttributeCount()
Returns the number of attributes of the vertices in this array.
|
boolean |
hasVertexAttribute(ILspVertexAttribute aVertexAttribute)
Checks whether this vertex array has the given vertex attribute.
|
void |
lock()
Obtains exclusive access to this vertex array for the calling thread.
|
void |
unlock()
Releases a previously obtained lock on this vertex array.
|
int getVertexAttributeCount()
ILspVertexAttribute getVertexAttribute(int aVertexAttributeIndex)
aVertexAttributeIndex
- an index between zero and getVertexAttributeCount()
ILspVertexAttribute
boolean hasVertexAttribute(ILspVertexAttribute aVertexAttribute)
aVertexAttribute
- the vertex attributevoid lock()
lock()
must be paired with a
call to unlock()
.void unlock()
lock()
.Buffer getData(int aVertexAttributeIndex)
aVertexAttributeIndex
- the index of the vertex attribute to get the buffer forBuffer getData(ILspVertexAttribute aVertexAttribute)
null
if no data is stored
for the given attribute.aVertexAttribute
- the attribute to retrieve the data fornull
if no data is availableILcdPoint getCoordinateOrigin()
int getSize()