Represents the runtime state of a set of material properties for a given MaterialPropertiesLayout. More...
#include <MaterialPropertyCollection.h>
Public Member Functions | |
| bool | Init (RHI::ConstPtr< MaterialPropertiesLayout > layout, const AZStd::vector< MaterialPropertyValue > &defaultValues) |
| template<typename Type > | |
| bool | SetPropertyValue (MaterialPropertyIndex index, const Type &value) |
| template<typename Type > | |
| const Type & | GetPropertyValue (MaterialPropertyIndex index) const |
| Gets the value of a material property. The template data type must match the property's data type. | |
| bool | SetPropertyValue (MaterialPropertyIndex index, const MaterialPropertyValue &value) |
| const MaterialPropertyValue & | GetPropertyValue (MaterialPropertyIndex index) const |
| Returns the value of a material property. | |
| const AZStd::vector< MaterialPropertyValue > & | GetPropertyValues () const |
| const MaterialPropertyFlags & | GetPropertyDirtyFlags () const |
| Gets flags indicating which properties have been modified. | |
| void | SetAllPropertyDirtyFlags () |
| Marks all properties as dirty. | |
| void | ClearAllPropertyDirtyFlags () |
| Marks all properties as not dirty. | |
| RHI::ConstPtr< MaterialPropertiesLayout > | GetMaterialPropertiesLayout () const |
| Gets the material properties layout. | |
Represents the runtime state of a set of material properties for a given MaterialPropertiesLayout.
| bool AZ::RPI::MaterialPropertyCollection::Init | ( | RHI::ConstPtr< MaterialPropertiesLayout > | layout, |
| const AZStd::vector< MaterialPropertyValue > & | defaultValues | ||
| ) |
Initialize or re-initialize the properties. If reinitializing, any values that were set via SetPropertyValue() before will be preserved and re-applied on top of the @defaultValues. Note this does not touch the property dirty flags, the calling code must call SetAllPropertyDirtyFlags() or ClearAllPropertyDirtyFlags() as needed.
| bool AZ::RPI::MaterialPropertyCollection::SetPropertyValue | ( | MaterialPropertyIndex | index, |
| const MaterialPropertyValue & | value | ||
| ) |
Sets the value of a material property. The @value data type must match the property's data type.
| bool AZ::RPI::MaterialPropertyCollection::SetPropertyValue | ( | MaterialPropertyIndex | index, |
| const Type & | value | ||
| ) |
Sets the value of a material property. The template data type must match the property's data type.