cesium-native
0.41.0
|
The material appearance of a primitive. More...
#include <CesiumGltf/Material.h>
Classes | |
struct | AlphaMode |
Known values for The alpha rendering mode of the material. More... | |
Public Attributes | |
std::optional< CesiumGltf::MaterialPBRMetallicRoughness > | pbrMetallicRoughness |
A set of parameter values that are used to define the metallic-roughness material model from Physically Based Rendering (PBR) methodology. When undefined, all the default values of pbrMetallicRoughness MUST apply. | |
std::optional< CesiumGltf::MaterialNormalTextureInfo > | normalTexture |
The tangent space normal texture. More... | |
std::optional< CesiumGltf::MaterialOcclusionTextureInfo > | occlusionTexture |
The occlusion texture. More... | |
std::optional< CesiumGltf::TextureInfo > | emissiveTexture |
The emissive texture. More... | |
std::vector< double > | emissiveFactor = {0, 0, 0} |
The factors for the emissive color of the material. More... | |
std::string | alphaMode = AlphaMode::OPAQUE |
The alpha rendering mode of the material. More... | |
double | alphaCutoff = 0.5 |
The alpha cutoff value of the material. More... | |
bool | doubleSided = false |
Specifies whether the material is double sided. More... | |
Public Attributes inherited from CesiumGltf::NamedObject | |
std::string | name |
The user-defined name of this object. More... | |
Public Attributes inherited from CesiumUtility::ExtensibleObject | |
std::unordered_map< std::string, std::any > | extensions |
The extensions attached to this object. More... | |
JsonValue::Object | extras |
Application-specific data. More... | |
JsonValue::Object | unknownProperties |
Unknown properties that exist on this object but do not have any representation in the statically-typed classes. More... | |
Static Public Attributes | |
static constexpr const char * | TypeName = "Material" |
Additional Inherited Members | |
Public Member Functions inherited from CesiumUtility::ExtensibleObject | |
template<typename T > | |
bool | hasExtension () const noexcept |
Checks if an extension exists given its static type. More... | |
template<typename T > | |
const T * | getExtension () const noexcept |
Gets an extension given its static type. More... | |
template<typename T > | |
T * | getExtension () noexcept |
Gets an extension given its static type. More... | |
const JsonValue * | getGenericExtension (const std::string &extensionName) const noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue. More... | |
JsonValue * | getGenericExtension (const std::string &extensionName) noexcept |
Gets a generic extension with the given name as a CesiumUtility::JsonValue. More... | |
template<typename T , typename... ConstructorArgumentTypes> | |
T & | addExtension (ConstructorArgumentTypes &&... constructorArguments) |
Adds a statically-typed extension to this object. More... | |
template<typename T > | |
void | removeExtension () |
Removes a statically-typed extension from this object. More... | |
The material appearance of a primitive.
Definition at line 20 of file Material.h.
double CesiumGltf::Material::alphaCutoff = 0.5 |
The alpha cutoff value of the material.
Specifies the cutoff threshold when in MASK
alpha mode. If the alpha value is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0
will render the entire material as fully transparent. This value MUST be ignored for other alpha modes. When alphaMode
is not defined, this value MUST NOT be defined.
Definition at line 105 of file Material.h.
std::string CesiumGltf::Material::alphaMode = AlphaMode::OPAQUE |
The alpha rendering mode of the material.
Known values are defined in AlphaMode.
The material's alpha rendering mode enumeration specifying the interpretation of the alpha value of the base color.
Definition at line 93 of file Material.h.
bool CesiumGltf::Material::doubleSided = false |
Specifies whether the material is double sided.
When this value is false, back-face culling is enabled. When this value is true, back-face culling is disabled and double-sided lighting is enabled. The back-face MUST have its normals reversed before the lighting equation is evaluated.
Definition at line 115 of file Material.h.
std::vector<double> CesiumGltf::Material::emissiveFactor = {0, 0, 0} |
The factors for the emissive color of the material.
This value defines linear multipliers for the sampled texels of the emissive texture.
Definition at line 82 of file Material.h.
std::optional<CesiumGltf::TextureInfo> CesiumGltf::Material::emissiveTexture |
The emissive texture.
It controls the color and intensity of the light being emitted by the material. This texture contains RGB components encoded with the sRGB transfer function. If a fourth component (A) is present, it MUST be ignored. When undefined, the texture MUST be sampled as having 1.0
in RGB components.
Definition at line 74 of file Material.h.
std::optional<CesiumGltf::MaterialNormalTextureInfo> CesiumGltf::Material::normalTexture |
The tangent space normal texture.
The texture encodes RGB components with linear transfer function. Each texel represents the XYZ components of a normal vector in tangent space. The normal vectors use the convention +X is right and +Y is up. +Z points toward the viewer. If a fourth component (A) is present, it MUST be ignored. When undefined, the material does not have a tangent space normal texture.
Definition at line 52 of file Material.h.
std::optional<CesiumGltf::MaterialOcclusionTextureInfo> CesiumGltf::Material::occlusionTexture |
The occlusion texture.
The occlusion values are linearly sampled from the R channel. Higher values indicate areas that receive full indirect lighting and lower values indicate no indirect lighting. If other channels are present (GBA), they MUST be ignored for occlusion calculations. When undefined, the material does not have an occlusion texture.
Definition at line 63 of file Material.h.