RAMSES Documentation  27.0.130
Information for RAMSES users and developers
ArrayBuffer.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2017 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_ARRAYBUFFER_H
10 #define RAMSES_ARRAYBUFFER_H
11 
14 
15 namespace ramses
16 {
27  {
28  public:
46  status_t updateData(uint32_t firstElement, uint32_t numElements, const void* bufferData);
47 
56  uint32_t getMaximumNumberOfElements() const;
57 
67  uint32_t getUsedNumberOfElements() const;
68 
75 
86  status_t getData(void* buffer, uint32_t numElements) const;
87 
91  class ArrayBufferImpl& impl;
92 
93  protected:
97  friend class SceneImpl;
98 
104  explicit ArrayBuffer(ArrayBufferImpl& pimpl);
105 
109  virtual ~ArrayBuffer();
110  };
111 }
112 
113 #endif
#define RAMSES_API
Definition: APIExport.h:35
The ArrayBuffer is a data object used to provide vertex or index data to ramses::GeometryBinding::set...
Definition: ArrayBuffer.h:27
virtual ~ArrayBuffer()
Destructor of the ArrayBuffer.
ArrayBuffer(ArrayBufferImpl &pimpl)
Constructor for ArrayBuffer.
EDataType getDataType() const
Returns the data type associated with the buffer data.
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...
class ArrayBufferImpl & impl
Definition: ArrayBuffer.h:91
status_t updateData(uint32_t firstElement, uint32_t numElements, const void *bufferData)
Update data of the ArrayBuffer object.
uint32_t getUsedNumberOfElements() const
Returns the used number of data elements.
uint32_t getMaximumNumberOfElements() const
Returns the maximum number of data elements that can be stored in the data buffer.
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26
EDataType
Specifies the data type used for creating data buffers.
Definition: EDataType.h:20