|
| AZ_TYPE_INFO (AZ::RPI::MaterialPropertyValue, "{59815051-BBA2-4C6A-A414-A82834A84CB2}") |
|
| MaterialPropertyValue ()=default |
| Constructors to allow implicit conversions.
|
|
| MaterialPropertyValue (const bool &value) |
|
| MaterialPropertyValue (const int32_t &value) |
|
| MaterialPropertyValue (const uint32_t &value) |
|
| MaterialPropertyValue (const float &value) |
|
| MaterialPropertyValue (const Vector2 &value) |
|
| MaterialPropertyValue (const Vector3 &value) |
|
| MaterialPropertyValue (const Vector4 &value) |
|
| MaterialPropertyValue (const Color &value) |
|
| MaterialPropertyValue (const Data::Asset< ImageAsset > &value) |
|
| MaterialPropertyValue (const Data::Instance< Image > &value) |
|
| MaterialPropertyValue (const AZStd::string &value) |
|
| MaterialPropertyValue (const Name &value) |
|
| MaterialPropertyValue (const MaterialPropertyValue &value) |
| Copy constructor.
|
|
template<typename T > |
MaterialPropertyValue & | operator= (const T &value) |
|
template<typename T > |
const T & | GetValue () const |
|
template<typename T > |
bool | Is () const |
| Check if the type holding is T.
|
|
TypeId | GetTypeId () const |
| Get TypeId of the type holding.
|
|
bool | IsValid () const |
| Check if the variant is holding a valid value.
|
|
bool | operator== (const MaterialPropertyValue &other) const |
| Default comparison.
|
|
bool | operator!= (const MaterialPropertyValue &other) const |
|
MaterialPropertyValue | CastToType (TypeId requestedType) const |
|
This is a variant data type that represents the value of a material property. For convenience, it supports all the types necessary for both the runtime data (MaterialAsset) as well as .material file data (MaterialSourceData). For example, Instance<Image> is exclusive to the runtime data and AZStd::string is primarily for image file paths in .material files. Most other data types are relevant in both contexts.
Attempt to cast the value to another type, handling numerical types (e.g. int to float, bool to int), vector types (e.g. Vector2 to Vector3) and color<->vector types (e.g. Vector[3-4] to Color). In conversions between vector based types of different dimension, the result gets truncated or padded with zeroes as needed. Conversions between color and vector types are only supported for 3 and 4 dimensional vectors. In case of incompatible types (e.g. string to float, Vector2 to Color), the current object is returned as-is.