cesium-native 0.43.0
Loading...
Searching...
No Matches
Mesh.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/Library.h>
6#include <CesiumGltf/MeshPrimitive.h>
7#include <CesiumGltf/NamedObject.h>
8
9#include <vector>
10
11namespace CesiumGltf {
16struct CESIUMGLTF_API Mesh final : public CesiumGltf::NamedObject {
20 static constexpr const char* TypeName = "Mesh";
21
25 std::vector<CesiumGltf::MeshPrimitive> primitives;
26
31 std::vector<double> weights;
32
39 int64_t getSizeBytes() const {
40 int64_t accum = 0;
41 accum += int64_t(sizeof(Mesh));
43 int64_t(sizeof(CesiumGltf::NamedObject));
44 accum += int64_t(
45 sizeof(CesiumGltf::MeshPrimitive) * this->primitives.capacity());
46 for (const CesiumGltf::MeshPrimitive& value : this->primitives) {
47 accum +=
48 value.getSizeBytes() - int64_t(sizeof(CesiumGltf::MeshPrimitive));
49 }
50 accum += int64_t(sizeof(double) * this->weights.capacity());
51 return accum;
52 }
53};
54} // namespace CesiumGltf
Classes for working with glTF models.
Geometry to be rendered with the given material.
A set of primitives to be rendered. Its global transform is defined by a node that references it.
Definition Mesh.h:16
std::vector< double > weights
Array of weights to be applied to the morph targets. The number of array elements MUST match the numb...
Definition Mesh.h:31
std::vector< CesiumGltf::MeshPrimitive > primitives
An array of primitives, each defining geometry to be rendered.
Definition Mesh.h:25
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Mesh.h:39
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