cesium-native 0.43.0
|
A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. More...
#include <CesiumGltf/MaterialPBRMetallicRoughness.h>
Public Member Functions | |
int64_t | getSizeBytes () const |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure. | |
Public Member Functions inherited from CesiumUtility::ExtensibleObject | |
template<typename T > | |
bool | hasExtension () const noexcept |
Checks if an extension exists given its static type. | |
template<typename T > | |
const T * | getExtension () const noexcept |
Gets an extension given its static type. | |
template<typename T > | |
T * | getExtension () noexcept |
Gets an extension given its static type. | |
const JsonValue * | getGenericExtension (const std::string &extensionName) const noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue . | |
JsonValue * | getGenericExtension (const std::string &extensionName) noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue . | |
template<typename T , typename... ConstructorArgumentTypes> | |
T & | addExtension (ConstructorArgumentTypes &&... constructorArguments) |
Adds a statically-typed extension to this object. | |
template<typename T > | |
void | removeExtension () |
Removes a statically-typed extension from this object. | |
int64_t | getSizeBytes () const |
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object. | |
Public Attributes | |
std::vector< double > | baseColorFactor = {1, 1, 1, 1} |
The factors for the base color of the material. | |
std::optional< CesiumGltf::TextureInfo > | baseColorTexture |
The base color texture. | |
double | metallicFactor = 1 |
The factor for the metalness of the material. | |
double | roughnessFactor = 1 |
The factor for the roughness of the material. | |
std::optional< CesiumGltf::TextureInfo > | metallicRoughnessTexture |
The metallic-roughness texture. | |
Public Attributes inherited from CesiumUtility::ExtensibleObject | |
std::unordered_map< std::string, std::any > | extensions |
The extensions attached to this object. | |
JsonValue::Object | extras |
Application-specific data. | |
JsonValue::Object | unknownProperties |
Unknown properties that exist on this object but do not have any representation in the statically-typed classes. | |
Static Public Attributes | |
static constexpr const char * | TypeName = "MaterialPBRMetallicRoughness" |
The original name of this type. | |
A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
Definition at line 18 of file MaterialPBRMetallicRoughness.h.
|
inline |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
Definition at line 79 of file MaterialPBRMetallicRoughness.h.
std::vector<double> CesiumGltf::MaterialPBRMetallicRoughness::baseColorFactor = {1, 1, 1, 1} |
The factors for the base color of the material.
This value defines linear multipliers for the sampled texels of the base color texture.
Definition at line 31 of file MaterialPBRMetallicRoughness.h.
std::optional<CesiumGltf::TextureInfo> CesiumGltf::MaterialPBRMetallicRoughness::baseColorTexture |
The base color texture.
The first three components (RGB) MUST be encoded with the sRGB transfer function. They specify the base color of the material. If the fourth component (A) is present, it represents the linear alpha coverage of the material. Otherwise, the alpha coverage is equal to 1.0
. The material.alphaMode
property specifies how alpha is interpreted. The stored texels MUST NOT be premultiplied. When undefined, the texture MUST be sampled as having 1.0
in all components.
Definition at line 44 of file MaterialPBRMetallicRoughness.h.
double CesiumGltf::MaterialPBRMetallicRoughness::metallicFactor = 1 |
The factor for the metalness of the material.
This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.
Definition at line 52 of file MaterialPBRMetallicRoughness.h.
std::optional<CesiumGltf::TextureInfo> CesiumGltf::MaterialPBRMetallicRoughness::metallicRoughnessTexture |
The metallic-roughness texture.
The metalness values are sampled from the B channel. The roughness values are sampled from the G channel. These values MUST be encoded with a linear transfer function. If other channels are present (R or A), they MUST be ignored for metallic-roughness calculations. When undefined, the texture MUST be sampled as having 1.0
in G and B components.
Definition at line 71 of file MaterialPBRMetallicRoughness.h.
double CesiumGltf::MaterialPBRMetallicRoughness::roughnessFactor = 1 |
The factor for the roughness of the material.
This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.
Definition at line 60 of file MaterialPBRMetallicRoughness.h.
|
staticconstexpr |
The original name of this type.
Definition at line 23 of file MaterialPBRMetallicRoughness.h.