cesium-native 0.43.0
Loading...
Searching...
No Matches
Camera.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/CameraOrthographic.h>
6#include <CesiumGltf/CameraPerspective.h>
7#include <CesiumGltf/Library.h>
8#include <CesiumGltf/NamedObject.h>
9
10#include <optional>
11#include <string>
12
13namespace CesiumGltf {
18struct CESIUMGLTF_API Camera final : public CesiumGltf::NamedObject {
22 static constexpr const char* TypeName = "Camera";
23
28 struct Type {
30 inline static const std::string perspective = "perspective";
31
33 inline static const std::string orthographic = "orthographic";
34 };
35
41 std::optional<CesiumGltf::CameraOrthographic> orthographic;
42
48 std::optional<CesiumGltf::CameraPerspective> perspective;
49
60 std::string type = Type::perspective;
61
68 int64_t getSizeBytes() const {
69 int64_t accum = 0;
70 accum += int64_t(sizeof(Camera));
72 int64_t(sizeof(CesiumGltf::NamedObject));
73 if (this->orthographic) {
74 accum += this->orthographic->getSizeBytes() -
75 int64_t(sizeof(CesiumGltf::CameraOrthographic));
76 }
77 if (this->perspective) {
78 accum += this->perspective->getSizeBytes() -
79 int64_t(sizeof(CesiumGltf::CameraPerspective));
80 }
81 return accum;
82 }
83};
84} // namespace CesiumGltf
Classes for working with glTF models.
An orthographic camera containing properties to create an orthographic projection matrix.
A perspective camera containing properties to create a perspective projection matrix.
Known values for Specifies if the camera uses a perspective or orthographic projection.
Definition Camera.h:28
A camera's projection. A node MAY reference a camera to apply a transform to place the camera in the ...
Definition Camera.h:18
std::optional< CesiumGltf::CameraOrthographic > orthographic
An orthographic camera containing properties to create an orthographic projection matrix....
Definition Camera.h:41
std::optional< CesiumGltf::CameraPerspective > perspective
A perspective camera containing properties to create a perspective projection matrix....
Definition Camera.h:48
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Camera.h:68
The base class for objects in a glTF that have a name.
Definition NamedObject.h:15
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition NamedObject.h:29