cesium-native 0.43.0
|
A typed view into a buffer view that contains raw binary data. More...
#include <CesiumGltf/AccessorSpec.h>
Classes | |
struct | ComponentType |
Known values for The datatype of the accessor's components. More... | |
struct | Type |
Known values for Specifies if the accessor's elements are scalars, vectors, or matrices. More... | |
Public Member Functions | |
int64_t | getSizeBytes () const |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure. | |
Public Member Functions inherited from CesiumGltf::NamedObject | |
int64_t | getSizeBytes () const |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. Calling this method may be slow as it requires traversing the object's entire structure. | |
Public Member Functions inherited from CesiumUtility::ExtensibleObject | |
template<typename T > | |
bool | hasExtension () const noexcept |
Checks if an extension exists given its static type. | |
template<typename T > | |
const T * | getExtension () const noexcept |
Gets an extension given its static type. | |
template<typename T > | |
T * | getExtension () noexcept |
Gets an extension given its static type. | |
const JsonValue * | getGenericExtension (const std::string &extensionName) const noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue . | |
JsonValue * | getGenericExtension (const std::string &extensionName) noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue . | |
template<typename T , typename... ConstructorArgumentTypes> | |
T & | addExtension (ConstructorArgumentTypes &&... constructorArguments) |
Adds a statically-typed extension to this object. | |
template<typename T > | |
void | removeExtension () |
Removes a statically-typed extension from this object. | |
int64_t | getSizeBytes () const |
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object. | |
Public Attributes | |
int32_t | bufferView = -1 |
The index of the bufferView. | |
int64_t | byteOffset = 0 |
The offset relative to the start of the buffer view in bytes. | |
int32_t | componentType = ComponentType::BYTE |
The datatype of the accessor's components. | |
bool | normalized = false |
Specifies whether integer data values are normalized before usage. | |
int64_t | count = int64_t() |
The number of elements referenced by this accessor. | |
std::string | type = Type::SCALAR |
Specifies if the accessor's elements are scalars, vectors, or matrices. | |
std::vector< double > | max |
Maximum value of each component in this accessor. | |
std::vector< double > | min |
Minimum value of each component in this accessor. | |
std::optional< CesiumGltf::AccessorSparse > | sparse |
Sparse storage of elements that deviate from their initialization value. | |
Public Attributes inherited from CesiumGltf::NamedObject | |
std::string | name |
The user-defined name of this object. | |
Public Attributes inherited from CesiumUtility::ExtensibleObject | |
std::unordered_map< std::string, std::any > | extensions |
The extensions attached to this object. | |
JsonValue::Object | extras |
Application-specific data. | |
JsonValue::Object | unknownProperties |
Unknown properties that exist on this object but do not have any representation in the statically-typed classes. | |
Static Public Attributes | |
static constexpr const char * | TypeName = "Accessor" |
The original name of this type. | |
Protected Member Functions | |
AccessorSpec ()=default | |
This class is not meant to be instantiated directly. Use Accessor instead. | |
Friends | |
struct | Accessor |
A typed view into a buffer view that contains raw binary data.
Definition at line 18 of file AccessorSpec.h.
|
inline |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
Definition at line 183 of file AccessorSpec.h.
|
friend |
Definition at line 202 of file AccessorSpec.h.
int32_t CesiumGltf::AccessorSpec::bufferView = -1 |
The index of the bufferView.
The index of the buffer view. When undefined, the accessor MUST be initialized with zeros; sparse
property or extensions MAY override zeros with actual values.
Definition at line 93 of file AccessorSpec.h.
int64_t CesiumGltf::AccessorSpec::byteOffset = 0 |
The offset relative to the start of the buffer view in bytes.
This MUST be a multiple of the size of the component datatype. This property MUST NOT be defined when bufferView
is undefined.
Definition at line 101 of file AccessorSpec.h.
int32_t CesiumGltf::AccessorSpec::componentType = ComponentType::BYTE |
The datatype of the accessor's components.
Known values are defined in ComponentType
.
UNSIGNED_INT type MUST NOT be used for any accessor that is not referenced by mesh.primitive.indices
.
Definition at line 112 of file AccessorSpec.h.
int64_t CesiumGltf::AccessorSpec::count = int64_t() |
The number of elements referenced by this accessor.
The number of elements referenced by this accessor, not to be confused with the number of bytes or number of components.
Definition at line 130 of file AccessorSpec.h.
std::vector<double> CesiumGltf::AccessorSpec::max |
Maximum value of each component in this accessor.
Array elements MUST be treated as having the same data type as accessor's componentType
. Both min
and max
arrays have the same length. The length is determined by the value of the type
property; it can be 1, 2, 3, 4, 9, or 16.
normalized
property has no effect on array values: they always correspond to the actual values stored in the buffer. When the accessor is sparse, this property MUST contain maximum values of accessor data with sparse substitution applied.
Definition at line 154 of file AccessorSpec.h.
std::vector<double> CesiumGltf::AccessorSpec::min |
Minimum value of each component in this accessor.
Array elements MUST be treated as having the same data type as accessor's componentType
. Both min
and max
arrays have the same length. The length is determined by the value of the type
property; it can be 1, 2, 3, 4, 9, or 16.
normalized
property has no effect on array values: they always correspond to the actual values stored in the buffer. When the accessor is sparse, this property MUST contain minimum values of accessor data with sparse substitution applied.
Definition at line 169 of file AccessorSpec.h.
bool CesiumGltf::AccessorSpec::normalized = false |
Specifies whether integer data values are normalized before usage.
Specifies whether integer data values are normalized (true
) to [0, 1] (for unsigned types) or to [-1, 1] (for signed types) when they are accessed. This property MUST NOT be set to true
for accessors with FLOAT
or UNSIGNED_INT
component type.
Definition at line 122 of file AccessorSpec.h.
std::optional<CesiumGltf::AccessorSparse> CesiumGltf::AccessorSpec::sparse |
Sparse storage of elements that deviate from their initialization value.
Definition at line 175 of file AccessorSpec.h.
std::string CesiumGltf::AccessorSpec::type = Type::SCALAR |
Specifies if the accessor's elements are scalars, vectors, or matrices.
Known values are defined in Type
.
Definition at line 139 of file AccessorSpec.h.
|
staticconstexpr |
The original name of this type.
Definition at line 22 of file AccessorSpec.h.