73 lines
2.2 KiB
C++
73 lines
2.2 KiB
C++
// This file was generated by generate-classes.
|
|
// DO NOT EDIT THIS FILE!
|
|
#pragma once
|
|
|
|
#include <CesiumGltf/Library.h>
|
|
#include <CesiumUtility/ExtensibleObject.h>
|
|
|
|
#include <cstdint>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace CesiumGltf {
|
|
/**
|
|
* @brief Feature IDs stored in a GPU mesh instancing attribute
|
|
*/
|
|
struct CESIUMGLTF_API ExtensionExtInstanceFeaturesFeatureId final
|
|
: public CesiumUtility::ExtensibleObject {
|
|
/**
|
|
* @brief The original name of this type.
|
|
*/
|
|
static constexpr const char* TypeName =
|
|
"ExtensionExtInstanceFeaturesFeatureId";
|
|
|
|
/**
|
|
* @brief The number of unique features in the attribute.
|
|
*/
|
|
int64_t featureCount = int64_t();
|
|
|
|
/**
|
|
* @brief A value that indicates that no feature is associated with this
|
|
* instance.
|
|
*/
|
|
std::optional<int64_t> nullFeatureId;
|
|
|
|
/**
|
|
* @brief A label assigned to this feature ID set. Labels must be alphanumeric
|
|
* identifiers matching the regular expression `^[a-zA-Z_][a-zA-Z0-9_]*$`.
|
|
*/
|
|
std::optional<std::string> label;
|
|
|
|
/**
|
|
* @brief An integer value used to construct a string in the format
|
|
* `_FEATURE_ID_<set index>` which is a reference to a key in
|
|
* `EXT_mesh_gpu_instancing.attributes` dictionary (e.g. a value of `0`
|
|
* corresponds to `_FEATURE_ID_0`).
|
|
*/
|
|
std::optional<int64_t> attribute;
|
|
|
|
/**
|
|
* @brief The index of the property table containing per-feature property
|
|
* values. Only applicable when using the `EXT_structural_metadata` extension.
|
|
*/
|
|
std::optional<int64_t> propertyTable;
|
|
|
|
/**
|
|
* @brief 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.
|
|
*/
|
|
int64_t getSizeBytes() const {
|
|
int64_t accum = 0;
|
|
accum += int64_t(sizeof(ExtensionExtInstanceFeaturesFeatureId));
|
|
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
|
|
int64_t(sizeof(CesiumUtility::ExtensibleObject));
|
|
if (this->label) {
|
|
accum += int64_t(this->label->capacity() * sizeof(char));
|
|
}
|
|
return accum;
|
|
}
|
|
};
|
|
} // namespace CesiumGltf
|