5#include <CesiumGltf/Box.h>
6#include <CesiumGltf/Capsule.h>
7#include <CesiumGltf/Cylinder.h>
8#include <CesiumGltf/Library.h>
9#include <CesiumGltf/NamedObject.h>
10#include <CesiumGltf/Sphere.h>
23 static constexpr const char*
TypeName =
"Shape";
31 inline static const std::string
sphere =
"sphere";
35 inline static const std::string
box =
"box";
40 inline static const std::string
capsule =
"capsule";
45 inline static const std::string
cylinder =
"cylinder";
59 std::optional<CesiumGltf::Sphere>
sphere;
64 std::optional<CesiumGltf::Box>
box;
69 std::optional<CesiumGltf::Capsule>
capsule;
84 accum += int64_t(
sizeof(
Shape));
99 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.
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,...
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::Cylinder > cylinder
A set of parameter values that are used to define a cylinder shape.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::optional< CesiumGltf::Sphere > sphere
A set of parameter values that are used to define a sphere shape.
std::string type
Specifies the shape type.
static constexpr const char * TypeName
The original name of this type.
std::optional< CesiumGltf::Box > box
A set of parameter values that are used to define a box shape.
std::optional< CesiumGltf::Capsule > capsule
A set of parameter values that are used to define a capsule shape.
Parameters describing a sphere shape.