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/Plane.h>
11#include <CesiumGltf/Sphere.h>
25 static constexpr const char*
TypeName =
"Shape";
34 inline static const std::string
box =
"box";
37 inline static const std::string
capsule =
"capsule";
40 inline static const std::string
cylinder =
"cylinder";
43 inline static const std::string
plane =
"plane";
46 inline static const std::string
sphere =
"sphere";
62 std::optional<CesiumGltf::Box>
box;
67 std::optional<CesiumGltf::Capsule>
capsule;
77 std::optional<CesiumGltf::Plane>
plane;
82 std::optional<CesiumGltf::Sphere>
sphere;
92 accum += int64_t(
sizeof(
Shape));
102 if (this->cylinder) {
103 accum += this->cylinder->getSizeBytes() -
Classes for working with glTF models.
An axis-aligned box with a size per-axis, centered at the origin in local space, with normals facing ...
A capsule, centered at the origin in local space with potentially different radii at each end,...
A cylinder, centered at the origin in local space with potentially different radii at each end,...
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,...
A plane centered at the origin in local space, optionally with finite extents, with normal along the ...
Known values for The type of shape this shape object represents. If any properties are explicitly spe...
static const std::string capsule
capsule
static const std::string cylinder
cylinder
static const std::string sphere
sphere
static const std::string box
box
static const std::string plane
plane
A generic, re-usable shape definition with no inherent meaning attached to it.
std::optional< CesiumGltf::Cylinder > cylinder
Parameter values defining 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
Parameter values defining a sphere shape.
std::string type
The type of shape this shape object represents. If any properties are explicitly specified for the sh...
static constexpr const char * TypeName
The original name of this type.
std::optional< CesiumGltf::Box > box
Parameter values defining a box shape.
std::optional< CesiumGltf::Capsule > capsule
Parameter values defining a capsule shape.
std::optional< CesiumGltf::Plane > plane
Parameter values defining a plane shape.
A sphere, centered at the origin in local space with a radius equal in all directions,...