cesium-native 0.53.0
Loading...
Searching...
No Matches
GltfModifierVersionExtension.h
1#pragma once
2
3#include <Cesium3DTilesSelection/Library.h>
4#include <CesiumUtility/ExtensibleObject.h>
5
6#include <optional>
7
8namespace CesiumGltf {
9struct Model;
10}
11
12namespace Cesium3DTilesSelection {
13
17struct CESIUM3DTILESSELECTION_API GltfModifierVersionExtension
24 static std::optional<int64_t>
25 getVersion(const CesiumGltf::Model& model) noexcept;
26
34 static void setVersion(CesiumGltf::Model& model, int64_t version) noexcept;
35
39 static constexpr const char* TypeName = "GltfModifierVersionExtension";
44 static constexpr const char* ExtensionName =
45 "CESIUM_INTERNAL_gltf_modifier_version";
46
50 int64_t version = 0;
51
58 int64_t getSizeBytes() const {
59 int64_t accum = 0;
60 accum += int64_t(sizeof(GltfModifierVersionExtension));
62 int64_t(sizeof(CesiumUtility::ExtensibleObject));
63 return accum;
64 }
65};
66
67} // namespace Cesium3DTilesSelection
Classes that implement the 3D Tiles standard.
Classes for working with glTF models.
An extension holding the "version" of a glTF produced by GltfModifier.
static std::optional< int64_t > getVersion(const CesiumGltf::Model &model) noexcept
Gets the version number of the given model, or std::nullopt if the model does not have the GltfModifi...
static constexpr const char * TypeName
The original name of this type.
int64_t version
The current GltfModifier version number of the model.
static constexpr const char * ExtensionName
The official name of the extension. This should be the same as its key in the extensions object.
static void setVersion(CesiumGltf::Model &model, int64_t version) noexcept
Sets the version number of the given model to the given value.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
This class is not meant to be instantiated directly. Use Model instead.
Definition Model.h:14
The base class for objects that have extensions and extras.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...