RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
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>
Public Member Functions | |
status_t | updateData (uint32_t firstElement, uint32_t numElements, const void *bufferData) |
Update data of the ArrayBuffer object. More... | |
uint32_t | getMaximumNumberOfElements () const |
Returns the maximum number of data elements that can be stored in the data buffer. More... | |
uint32_t | getUsedNumberOfElements () const |
Returns the used number of data elements. More... | |
EDataType | getDataType () const |
Returns the data type associated with the buffer data. More... | |
status_t | 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. More... | |
Public Member Functions inherited from ramses::SceneObject | |
sceneObjectId_t | getSceneObjectId () const |
Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More... | |
sceneId_t | getSceneId () const |
Returns sceneid to which this object belongs to. More... | |
Public Member Functions inherited from ramses::RamsesObject | |
const char * | getName () const |
Returns the name of the object. More... | |
status_t | setName (const char *name) |
Changes the name of the object. More... | |
ERamsesObjectType | getType () const |
Gets type of the object. More... | |
bool | isOfType (ERamsesObjectType type) const |
Checks if the object is of given type. More... | |
Public Member Functions inherited from ramses::StatusObject | |
status_t | validate () const |
Generates verbose validation of the object. More... | |
const char * | getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const |
Provides verbose report in human readable form generated by validate. More... | |
const char * | getStatusMessage (status_t status) const |
Get the string description for a status provided by a RAMSES API function. More... | |
StatusObject (const StatusObject &other)=delete | |
Deleted copy constructor. More... | |
StatusObject & | operator= (const StatusObject &other)=delete |
Deleted copy assignment. More... | |
Public Attributes | |
class ArrayBufferImpl & | impl |
Public Attributes inherited from ramses::SceneObject | |
class SceneObjectImpl & | impl |
Public Attributes inherited from ramses::ClientObject | |
class ClientObjectImpl & | impl |
Public Attributes inherited from ramses::RamsesObject | |
class RamsesObjectImpl & | impl |
Public Attributes inherited from ramses::StatusObject | |
class StatusObjectImpl & | impl |
Protected Member Functions | |
ArrayBuffer (ArrayBufferImpl &pimpl) | |
Constructor for ArrayBuffer. More... | |
virtual | ~ArrayBuffer () |
Destructor of the ArrayBuffer. More... | |
Protected Member Functions inherited from ramses::SceneObject | |
SceneObject (SceneObjectImpl &pimpl) | |
Constructor for SceneObject. More... | |
virtual | ~SceneObject () |
Destructor of the SceneObject. More... | |
Protected Member Functions inherited from ramses::ClientObject | |
ClientObject (ClientObjectImpl &pimpl) | |
Constructor for ClientObject. More... | |
virtual | ~ClientObject () |
Destructor of the ClientObject. More... | |
Protected Member Functions inherited from ramses::RamsesObject | |
RamsesObject (RamsesObjectImpl &pimpl) | |
Constructor for RamsesObject. More... | |
virtual | ~RamsesObject () |
Destructor of the RamsesObject. More... | |
Protected Member Functions inherited from ramses::StatusObject | |
StatusObject (StatusObjectImpl &pimpl) | |
Constructor for StatusObject. More... | |
virtual | ~StatusObject () |
Destructor of the StatusObject. More... | |
Friends | |
class | SceneImpl |
Scene is the factory for creating ArrayBuffer instances. More... | |
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.
|
explicitprotected |
Constructor for ArrayBuffer.
[in] | pimpl | Internal data for implementation specifics of ArrayBuffer (sink - instance becomes owner) |
|
protectedvirtual |
Destructor of the ArrayBuffer.
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.
[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. |
EDataType ramses::ArrayBuffer::getDataType | ( | ) | const |
Returns the data type associated with the buffer data.
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.
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.
status_t ramses::ArrayBuffer::updateData | ( | uint32_t | firstElement, |
uint32_t | numElements, | ||
const void * | bufferData | ||
) |
Update data of the ArrayBuffer object.
For ArrayBuffer objects of type ramses::EDataType::ByteBlob an element is defined as 1 byte.
firstElement | The element index at which data update should begin. |
numElements | The number of elements to be updated. FirstElement + numElements must be less than or equal to getMaximumNumberOfElements specified at creation time of the ArrayBuffer object. The function writes (or overwrites) buffer data up to the specified count only, leaving any previously written or un-initialized data untouched. |
bufferData | Pointer in memory to the data provided for update. The function makes a copy of the data into ArrayBuffer data structures. ArrayBuffer object does not take ownership of the memory data passed to it. |
|
friend |
Scene is the factory for creating ArrayBuffer instances.
class ArrayBufferImpl& ramses::ArrayBuffer::impl |
Stores internal data for implementation specifics of ArrayBuffer.