cesium-native 0.43.0
|
A single property of a metadata class. More...
#include <Cesium3DTiles/ClassProperty.h>
Classes | |
struct | ComponentType |
Known values for The datatype of the element's components. Required for SCALAR , VECN , and MATN types, and disallowed for other types. More... | |
struct | Type |
Known values for The element type. 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 | |
std::optional< std::string > | name |
The name of the property, e.g. for display purposes. | |
std::optional< std::string > | description |
The description of the property. | |
std::string | type = Type::SCALAR |
The element type. | |
std::optional< std::string > | componentType |
The datatype of the element's components. Required for SCALAR , VECN , and MATN types, and disallowed for other types. | |
std::optional< std::string > | enumType |
Enum ID as declared in the enums dictionary. Required when type is ENUM . Disallowed when type is not ENUM | |
bool | array = false |
Whether the property is an array. When count is defined the property is a fixed-length array. Otherwise the property is a variable-length array. | |
std::optional< int64_t > | count |
The number of array elements. May only be defined when array is true . | |
bool | normalized = false |
Specifies whether integer values are normalized. Only applicable to SCALAR , VECN , and MATN types with integer component types. For unsigned integer component types, values are normalized between [0.0, 1.0] . For signed integer component types, values are normalized between [-1.0, 1.0] . For all other component types, this property shall be false. | |
std::optional< CesiumUtility::JsonValue > | offset |
An offset to apply to property values. Only applicable to SCALAR , VECN , and MATN types when the component type is FLOAT32 or FLOAT64 , or when the property is normalized . Not applicable to variable-length arrays. | |
std::optional< CesiumUtility::JsonValue > | scale |
A scale to apply to property values. Only applicable to SCALAR , VECN , and MATN types when the component type is FLOAT32 or FLOAT64 , or when the property is normalized . Not applicable to variable-length arrays. | |
std::optional< CesiumUtility::JsonValue > | max |
Maximum allowed value for the property. 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. Not applicable to variable-length arrays. | |
std::optional< CesiumUtility::JsonValue > | min |
Minimum allowed value for the property. 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. Not applicable to variable-length arrays. | |
bool | required = false |
If required, the property shall be present in every entity conforming to the class. If not required, individual entities may include noData values, or the entire property may be omitted. As a result, noData has no effect on a required property. Client implementations may use required properties to make performance optimizations. | |
std::optional< CesiumUtility::JsonValue > | noData |
A noData value represents missing data — also known as a sentinel value — wherever it appears. BOOLEAN properties may not specify noData values. This is given as the plain property value, without the transforms from the normalized , offset , and scale properties. Shall not be defined if required is true. | |
std::optional< CesiumUtility::JsonValue > | defaultProperty |
A default value to use when encountering a noData value or an omitted property. The value is given in its final form, taking the effect of normalized , offset , and scale properties into account. Shall not be defined if required is true. | |
std::optional< std::string > | semantic |
An identifier that describes how this property should be interpreted. The semantic cannot be used by other properties in the class. | |
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 = "ClassProperty" |
The original name of this type. | |
A single property of a metadata class.
Definition at line 17 of file ClassProperty.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 221 of file ClassProperty.h.
bool Cesium3DTiles::ClassProperty::array = false |
Whether the property is an array. When count
is defined the property is a fixed-length array. Otherwise the property is a variable-length array.
Definition at line 133 of file ClassProperty.h.
std::optional<std::string> Cesium3DTiles::ClassProperty::componentType |
The datatype of the element's components. Required for SCALAR
, VECN
, and MATN
types, and disallowed for other types.
Known values are defined in ComponentType
.
Definition at line 120 of file ClassProperty.h.
std::optional<int64_t> Cesium3DTiles::ClassProperty::count |
The number of array elements. May only be defined when array
is true
.
Definition at line 139 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::defaultProperty |
A default value to use when encountering a noData
value or an omitted property. The value is given in its final form, taking the effect of normalized
, offset
, and scale
properties into account. Shall not be defined if required
is true.
Definition at line 207 of file ClassProperty.h.
std::optional<std::string> Cesium3DTiles::ClassProperty::description |
The description of the property.
Definition at line 103 of file ClassProperty.h.
std::optional<std::string> Cesium3DTiles::ClassProperty::enumType |
Enum ID as declared in the enums
dictionary. Required when type
is ENUM
. Disallowed when type
is not ENUM
Definition at line 126 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::max |
Maximum allowed value for the property. 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. Not applicable to variable-length arrays.
Definition at line 173 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::min |
Minimum allowed value for the property. 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. Not applicable to variable-length arrays.
Definition at line 181 of file ClassProperty.h.
std::optional<std::string> Cesium3DTiles::ClassProperty::name |
The name of the property, e.g. for display purposes.
Definition at line 98 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::noData |
A noData
value represents missing data — also known as a sentinel value — wherever it appears. BOOLEAN
properties may not specify noData
values. This is given as the plain property value, without the transforms from the normalized
, offset
, and scale
properties. Shall not be defined if required
is true.
Definition at line 199 of file ClassProperty.h.
bool Cesium3DTiles::ClassProperty::normalized = false |
Specifies whether integer values are normalized. Only applicable to SCALAR
, VECN
, and MATN
types with integer component types. For unsigned integer component types, values are normalized between [0.0, 1.0]
. For signed integer component types, values are normalized between [-1.0, 1.0]
. For all other component types, this property shall be false.
Definition at line 149 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::offset |
An offset to apply to property values. Only applicable to SCALAR
, VECN
, and MATN
types when the component type is FLOAT32
or FLOAT64
, or when the property is normalized
. Not applicable to variable-length arrays.
Definition at line 157 of file ClassProperty.h.
bool Cesium3DTiles::ClassProperty::required = false |
If required, the property shall be present in every entity conforming to the class. If not required, individual entities may include noData
values, or the entire property may be omitted. As a result, noData
has no effect on a required property. Client implementations may use required properties to make performance optimizations.
Definition at line 190 of file ClassProperty.h.
std::optional<CesiumUtility::JsonValue> Cesium3DTiles::ClassProperty::scale |
A scale to apply to property values. Only applicable to SCALAR
, VECN
, and MATN
types when the component type is FLOAT32
or FLOAT64
, or when the property is normalized
. Not applicable to variable-length arrays.
Definition at line 165 of file ClassProperty.h.
std::optional<std::string> Cesium3DTiles::ClassProperty::semantic |
An identifier that describes how this property should be interpreted. The semantic cannot be used by other properties in the class.
Definition at line 213 of file ClassProperty.h.
std::string Cesium3DTiles::ClassProperty::type = Type::SCALAR |
|
staticconstexpr |
The original name of this type.
Definition at line 22 of file ClassProperty.h.