3 #include "CesiumGltf/AccessorView.h"
21 : _accessor(accessorView) {}
26 : _accessor(pData, stride, offset,
size) {}
30 : _accessor(model, accessor) {}
34 : _accessor(model, accessorIndex) {}
37 const T&
operator[](int64_t i)
const {
return this->_accessor[i]; }
40 T&
operator[](int64_t i) {
return const_cast<T&
>(this->_accessor[i]); }
43 int64_t
size() const noexcept {
return this->_accessor.
size(); }
52 return this->_accessor.
status();
A view on the data of one accessor of a glTF asset.
int64_t size() const noexcept
Returns the size (number of elements) of this accessor.
AccessorViewStatus status() const noexcept
Gets the status of this accessor view.
Provides write access to an AccessorView.
AccessorWriter(std::byte *pData, int64_t stride, int64_t offset, int64_t size)
T & operator[](int64_t i)
Provides the specified accessor element.
const T & operator[](int64_t i) const
Provides the specified accessor element.
AccessorWriter(Model &model, const Accessor &accessor)
Creates a new instance from a given model and Accessor.
AccessorWriter(Model &model, int32_t accessorIndex) noexcept
Creates a new instance from a given model and accessor index.
AccessorWriter(const AccessorView< T > &accessorView)
Constructs a new instance from an AccessorView.
int64_t size() const noexcept
Returns the size (number of elements) of this accessor.
AccessorViewStatus status() const noexcept
Gets the status of this accessor writer.
Classes for working with glTF models.
AccessorViewStatus
Indicates the status of an accessor view.
A typed view into a buffer view that contains raw binary data.
The root object for a glTF asset.