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>
24 static constexpr const char*
TypeName =
"ExtensionKhrImplicitShapesShape";
32 inline static const std::string
sphere =
"sphere";
36 inline static const std::string
box =
"box";
41 inline static const std::string
capsule =
"capsule";
46 inline static const std::string
cylinder =
"cylinder";
60 std::optional<CesiumGltf::ExtensionKhrImplicitShapesSphere>
sphere;
65 std::optional<CesiumGltf::ExtensionKhrImplicitShapesBox>
box;
70 std::optional<CesiumGltf::ExtensionKhrImplicitShapesCapsule>
capsule;
75 std::optional<CesiumGltf::ExtensionKhrImplicitShapesCylinder>
cylinder;
89 accum += this->sphere->getSizeBytes() -
93 accum += this->box->getSizeBytes() -
97 accum += this->capsule->getSizeBytes() -
100 if (this->cylinder) {
101 accum += this->cylinder->getSizeBytes() -
Classes for working with glTF models.
Parameters describing a box shape.
Parameters describing a capsule shape.
Parameters describing a cylinder shape.
Known values for Specifies the shape type.
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.
Parameters describing an implicit shape.
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::string type
Specifies the shape type.
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,...
Parameters describing a sphere shape.
The base class for objects in a glTF that have a name.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...