cesium-native 0.43.0
|
An array of binary property values. This represents one column of a property table, and contains one value of a certain property for each metadata entity. More...
#include <Cesium3DTiles/PropertyTableProperty.h>
Classes | |
struct | ArrayOffsetType |
Known values for The type of values in arrayOffsets . More... | |
struct | StringOffsetType |
Known values for The type of values in stringOffsets . 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 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 | |
int64_t | values = int64_t() |
The index of the buffer view containing property values. The data type of property values is determined by the property definition: When type is BOOLEAN values are packed into a bitstream. When type is STRING values are stored as byte sequences and decoded as UTF-8 strings. When type is SCALAR , VECN , or MATN the values are stored as the provided componentType and the buffer view byteOffset shall be aligned to a multiple of the componentType size. When type is ENUM values are stored as the enum's valueType and the buffer view byteOffset shall be aligned to a multiple of the valueType size. Each enum value in the array shall match one of the allowed values in the enum definition. arrayOffsets is required for variable-length arrays and stringOffsets is required for strings (for variable-length arrays of strings, both are required). | |
std::optional< int64_t > | arrayOffsets |
The index of the buffer view containing offsets for variable-length arrays. The number of offsets is equal to the property table count plus one. The offsets represent the start positions of each array, with the last offset representing the position after the last array. The array length is computed using the difference between the subsequent offset and the current offset. If type is STRING the offsets index into the string offsets array (stored in stringOffsets ), otherwise they index into the property array (stored in values ). The data type of these offsets is determined by arrayOffsetType . The buffer view byteOffset shall be aligned to a multiple of the arrayOffsetType size. | |
std::optional< int64_t > | stringOffsets |
The index of the buffer view containing offsets for strings. The number of offsets is equal to the number of string elements plus one. The offsets represent the byte offsets of each string in the property array (stored in values ), with the last offset representing the byte offset after the last string. The string byte length is computed using the difference between the subsequent offset and the current offset. The data type of these offsets is determined by stringOffsetType . The buffer view byteOffset shall be aligned to a multiple of the stringOffsetType size. | |
std::string | arrayOffsetType = ArrayOffsetType::UINT32 |
The type of values in arrayOffsets . | |
std::string | stringOffsetType = StringOffsetType::UINT32 |
The type of values in stringOffsets . | |
std::optional< CesiumUtility::JsonValue > | offset |
An offset to apply to property values. Only applicable when the component type is FLOAT32 or FLOAT64 , or when the property is normalized . Overrides the class property's offset if both are defined. | |
std::optional< CesiumUtility::JsonValue > | scale |
A scale to apply to property values. Only applicable when the component type is FLOAT32 or FLOAT64 , or when the property is normalized . Overrides the class property's scale if both are defined. | |
std::optional< CesiumUtility::JsonValue > | max |
Maximum value present in the property values. Only applicable to SCALAR , VECN , and MATN types. This is the maximum of all property values, after the transforms based on the normalized , offset , and scale properties have been applied. | |
std::optional< CesiumUtility::JsonValue > | min |
Minimum value present in the property values. Only applicable to SCALAR , VECN , and MATN types. This is the minimum of all property values, after the transforms based on the normalized , offset , and scale properties have been applied. | |
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 = "PropertyTableProperty" |
The original name of this type. | |
An array of binary property values. This represents one column of a property table, and contains one value of a certain property for each metadata entity.
Definition at line 19 of file PropertyTableProperty.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 155 of file PropertyTableProperty.h.
std::optional<int64_t> Cesium3DTiles::PropertyTableProperty::arrayOffsets |
The index of the buffer view containing offsets for variable-length arrays. The number of offsets is equal to the property table count
plus one. The offsets represent the start positions of each array, with the last offset representing the position after the last array. The array length is computed using the difference between the subsequent offset and the current offset. If type
is STRING
the offsets index into the string offsets array (stored in stringOffsets
), otherwise they index into the property array (stored in values
). The data type of these offsets is determined by arrayOffsetType
. The buffer view byteOffset
shall be aligned to a multiple of the arrayOffsetType
size.
Definition at line 89 of file PropertyTableProperty.h.
std::string Cesium3DTiles::PropertyTableProperty::arrayOffsetType = ArrayOffsetType::UINT32 |
The type of values in arrayOffsets
.
Known values are defined in ArrayOffsetType
.
Definition at line 109 of file PropertyTableProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::PropertyTableProperty::max |
Maximum value present in the property values. Only applicable to SCALAR
, VECN
, and MATN
types. This is the maximum of all property values, after the transforms based on the normalized
, offset
, and scale
properties have been applied.
Definition at line 139 of file PropertyTableProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::PropertyTableProperty::min |
Minimum value present in the property values. Only applicable to SCALAR
, VECN
, and MATN
types. This is the minimum of all property values, after the transforms based on the normalized
, offset
, and scale
properties have been applied.
Definition at line 147 of file PropertyTableProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::PropertyTableProperty::offset |
An offset to apply to property values. Only applicable when the component type is FLOAT32
or FLOAT64
, or when the property is normalized
. Overrides the class property's offset
if both are defined.
Definition at line 124 of file PropertyTableProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::PropertyTableProperty::scale |
A scale to apply to property values. Only applicable when the component type is FLOAT32
or FLOAT64
, or when the property is normalized
. Overrides the class property's scale
if both are defined.
Definition at line 131 of file PropertyTableProperty.h.
std::optional<int64_t> Cesium3DTiles::PropertyTableProperty::stringOffsets |
The index of the buffer view containing offsets for strings. The number of offsets is equal to the number of string elements plus one. The offsets represent the byte offsets of each string in the property array (stored in values
), with the last offset representing the byte offset after the last string. The string byte length is computed using the difference between the subsequent offset and the current offset. The data type of these offsets is determined by stringOffsetType
. The buffer view byteOffset
shall be aligned to a multiple of the stringOffsetType
size.
Definition at line 101 of file PropertyTableProperty.h.
std::string Cesium3DTiles::PropertyTableProperty::stringOffsetType = StringOffsetType::UINT32 |
The type of values in stringOffsets
.
Known values are defined in StringOffsetType
.
Definition at line 117 of file PropertyTableProperty.h.
|
staticconstexpr |
The original name of this type.
Definition at line 24 of file PropertyTableProperty.h.
int64_t Cesium3DTiles::PropertyTableProperty::values = int64_t() |
The index of the buffer view containing property values. The data type of property values is determined by the property definition: When type
is BOOLEAN
values are packed into a bitstream. When type
is STRING
values are stored as byte sequences and decoded as UTF-8 strings. When type
is SCALAR
, VECN
, or MATN
the values are stored as the provided componentType
and the buffer view byteOffset
shall be aligned to a multiple of the componentType
size. When type
is ENUM
values are stored as the enum's valueType
and the buffer view byteOffset
shall be aligned to a multiple of the valueType
size. Each enum value in the array shall match one of the allowed values in the enum definition. arrayOffsets
is required for variable-length arrays and stringOffsets
is required for strings (for variable-length arrays of strings, both are required).
Definition at line 75 of file PropertyTableProperty.h.