The ArrayBuffer is a data object used to provide vertex or index data to ramses::GeometryBinding::setInputBuffer and ramses::GeometryBinding::setIndices. The buffer data of an ArrayBuffer is not filled initially and can be fully or partially updated in between scene flushes.
More...
#include <ArrayBuffer.h>
|
class ArrayBufferImpl & | impl |
|
class SceneObjectImpl & | impl |
|
class ClientObjectImpl & | impl |
|
class RamsesObjectImpl & | impl |
|
class StatusObjectImpl & | impl |
|
The ArrayBuffer is a data object used to provide vertex or index data to ramses::GeometryBinding::setInputBuffer and ramses::GeometryBinding::setIndices. The buffer data of an ArrayBuffer is not filled initially and can be fully or partially updated in between scene flushes.
If an ArrayBuffer object is created with type ramses::EDataType::ByteBlob then an element is defined as one byte, rather than a logical vertex element. Hence, all functions of ArrayBuffer referring to element refer to a single byte within byte array.
- Examples
- ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, and ramses-example-local-pick-handling/src/main.cpp.
◆ ArrayBuffer()
ramses::ArrayBuffer::ArrayBuffer |
( |
ArrayBufferImpl & |
pimpl | ) |
|
|
explicitprotected |
Constructor for ArrayBuffer.
- Parameters
-
[in] | pimpl | Internal data for implementation specifics of ArrayBuffer (sink - instance becomes owner) |
◆ ~ArrayBuffer()
virtual ramses::ArrayBuffer::~ArrayBuffer |
( |
| ) |
|
|
protectedvirtual |
◆ getData()
status_t ramses::ArrayBuffer::getData |
( |
void * |
buffer, |
|
|
uint32_t |
numElements |
|
) |
| const |
Copies the data of the data buffer into a user-provided buffer. The buffer must be sufficiently large to hold the data for the whole data buffer.
- Parameters
-
[out] | buffer | The buffer where the buffer data will be copied into |
[in] | numElements | The number of elements to copy. For ArrayBuffer objects of type ramses::EDataType::ByteBlob this is the size in bytes of the data to copy. |
- Returns
- StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
◆ getDataType()
EDataType ramses::ArrayBuffer::getDataType |
( |
| ) |
const |
Returns the data type associated with the buffer data.
- Returns
- data type of buffer data
◆ getMaximumNumberOfElements()
uint32_t ramses::ArrayBuffer::getMaximumNumberOfElements |
( |
| ) |
const |
Returns the maximum number of data elements that can be stored in the data buffer.
For ArrayBuffer objects of type ramses::EDataType::ByteBlob this function returns the maximum size of buffer data in bytes.
- Returns
- Maximum number of elements
◆ getUsedNumberOfElements()
uint32_t ramses::ArrayBuffer::getUsedNumberOfElements |
( |
| ) |
const |
Returns the used number of data elements.
If data buffer fully set by updateData, then used and maximum number of elements are equal. For ArrayBuffer objects of type ramses::EDataType::ByteBlob this function returns the used size of buffer data in bytes becuase element is defined as byte for this type.
- Returns
- Used size in number of elements
◆ updateData()
status_t ramses::ArrayBuffer::updateData |
( |
uint32_t |
firstElement, |
|
|
uint32_t |
numElements, |
|
|
const void * |
bufferData |
|
) |
| |
◆ SceneImpl
◆ impl
class ArrayBufferImpl& ramses::ArrayBuffer::impl |
Stores internal data for implementation specifics of ArrayBuffer.
The documentation for this class was generated from the following file:
- /home/runner/work/ramses/ramses/client/ramses-client/ramses-client-api/include/ramses-client-api/ArrayBuffer.h