cesium-native 0.65.0
Loading...
Searching...
No Matches
ExtensionKhrImplicitShapesShape.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/ExtensionKhrImplicitShapesBox.h>
6#include <CesiumGltf/ExtensionKhrImplicitShapesCapsule.h>
7#include <CesiumGltf/ExtensionKhrImplicitShapesCylinder.h>
8#include <CesiumGltf/ExtensionKhrImplicitShapesSphere.h>
9#include <CesiumGltf/Library.h>
10#include <CesiumGltf/NamedObject.h>
11
12#include <optional>
13#include <string>
14
15namespace CesiumGltf {
19struct CESIUMGLTF_API ExtensionKhrImplicitShapesShape final
24 static constexpr const char* TypeName = "ExtensionKhrImplicitShapesShape";
25
29 struct Type {
32 inline static const std::string sphere = "sphere";
33
36 inline static const std::string box = "box";
37
41 inline static const std::string capsule = "capsule";
42
46 inline static const std::string cylinder = "cylinder";
47 };
48
55 std::string type = Type::sphere;
56
60 std::optional<CesiumGltf::ExtensionKhrImplicitShapesSphere> sphere;
61
65 std::optional<CesiumGltf::ExtensionKhrImplicitShapesBox> box;
66
70 std::optional<CesiumGltf::ExtensionKhrImplicitShapesCapsule> capsule;
71
75 std::optional<CesiumGltf::ExtensionKhrImplicitShapesCylinder> cylinder;
76
83 int64_t getSizeBytes() const {
84 int64_t accum = 0;
85 accum += int64_t(sizeof(ExtensionKhrImplicitShapesShape));
87 int64_t(sizeof(CesiumGltf::NamedObject));
88 if (this->sphere) {
89 accum += this->sphere->getSizeBytes() -
91 }
92 if (this->box) {
93 accum += this->box->getSizeBytes() -
95 }
96 if (this->capsule) {
97 accum += this->capsule->getSizeBytes() -
99 }
100 if (this->cylinder) {
101 accum += this->cylinder->getSizeBytes() -
103 }
104 return accum;
105 }
106};
107} // namespace CesiumGltf
Classes for working with glTF models.
static const std::string capsule
A capsule shape, centered at the origin in local space, equivalent to the convex hull of two spheres ...
static const std::string cylinder
A cylinder shape, centered at the origin in local space, equivalent to the convex hull of two circles...
static const std::string sphere
A sphere with a specified radius, centered at the origin in local space.
static const std::string box
An axis-aligned box with a size per-axis, centered at the origin in local space.
std::optional< CesiumGltf::ExtensionKhrImplicitShapesCylinder > cylinder
A set of parameter values that are used to define a cylinder shape.
std::optional< CesiumGltf::ExtensionKhrImplicitShapesBox > box
A set of parameter values that are used to define a box shape.
std::optional< CesiumGltf::ExtensionKhrImplicitShapesCapsule > capsule
A set of parameter values that are used to define a capsule shape.
static constexpr const char * TypeName
The original name of this type.
std::optional< CesiumGltf::ExtensionKhrImplicitShapesSphere > sphere
A set of parameter values that are used to define a sphere shape.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
The base class for objects in a glTF that have a name.
Definition NamedObject.h:14
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition NamedObject.h:28