cesium-native 0.43.0
Loading...
Searching...
No Matches
MaterialPBRMetallicRoughness.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/TextureInfo.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <optional>
10#include <vector>
11
12namespace CesiumGltf {
18struct CESIUMGLTF_API MaterialPBRMetallicRoughness final
23 static constexpr const char* TypeName = "MaterialPBRMetallicRoughness";
24
31 std::vector<double> baseColorFactor = {1, 1, 1, 1};
32
44 std::optional<CesiumGltf::TextureInfo> baseColorTexture;
45
52 double metallicFactor = 1;
53
60 double roughnessFactor = 1;
61
71 std::optional<CesiumGltf::TextureInfo> metallicRoughnessTexture;
72
79 int64_t getSizeBytes() const {
80 int64_t accum = 0;
81 accum += int64_t(sizeof(MaterialPBRMetallicRoughness));
83 int64_t(sizeof(CesiumUtility::ExtensibleObject));
84 accum += int64_t(sizeof(double) * this->baseColorFactor.capacity());
85 if (this->baseColorTexture) {
86 accum += this->baseColorTexture->getSizeBytes() -
87 int64_t(sizeof(CesiumGltf::TextureInfo));
88 }
89 if (this->metallicRoughnessTexture) {
90 accum += this->metallicRoughnessTexture->getSizeBytes() -
91 int64_t(sizeof(CesiumGltf::TextureInfo));
92 }
93 return accum;
94 }
95};
96} // namespace CesiumGltf
Classes for working with glTF models.
A set of parameter values that are used to define the metallic-roughness material model from Physical...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::optional< CesiumGltf::TextureInfo > metallicRoughnessTexture
The metallic-roughness texture.
std::optional< CesiumGltf::TextureInfo > baseColorTexture
The base color texture.
Reference to a texture.
Definition TextureInfo.h:14
The base class for objects that have extensions and extras.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...