Open 3D Engine AtomLyIntegration Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Render::MaterialAssignmentId Struct Referencefinal

#include <MaterialAssignmentId.h>

Public Member Functions

 AZ_RTTI (AZ::Render::MaterialAssignmentId, "{EB603581-4654-4C17-B6DE-AE61E79EDA97}")
 
 AZ_CLASS_ALLOCATOR (AZ::Render::MaterialAssignmentId, SystemAllocator)
 
 MaterialAssignmentId (MaterialAssignmentLodIndex lodIndex, RPI::ModelMaterialSlot::StableId materialSlotStableId)
 
bool IsDefault () const
 Returns true if the slot stable ID and LOD are invalid, meaning this assignment applies to the entire model.
 
bool IsSlotIdOnly () const
 Returns true if the slot stable ID is valid and LOD is invalid, meaning this assignment applies to every LOD.
 
bool IsLodAndSlotId () const
 Returns true if the slot stable ID and LOD are both valid, meaning this assignment applies to a single material slot on a specific LOD.
 
AZStd::string ToString () const
 Creates a string describing all the details of the assignment ID.
 
size_t GetHash () const
 Creates a hash composed of all elements of the assignment ID.
 
bool operator== (const MaterialAssignmentId &rhs) const
 
bool operator!= (const MaterialAssignmentId &rhs) const
 

Static Public Member Functions

static void Reflect (ReflectContext *context)
 
static bool ConvertVersion (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement)
 
static MaterialAssignmentId CreateDefault ()
 Create an ID that maps to all material slots, regardless of slot ID or LOD, effectively applying to an entire model.
 
static MaterialAssignmentId CreateFromStableIdOnly (RPI::ModelMaterialSlot::StableId materialSlotStableId)
 Create an ID that maps to all material slots with a corresponding slot ID, regardless of LOD.
 
static MaterialAssignmentId CreateFromLodAndStableId (MaterialAssignmentLodIndex lodIndex, RPI::ModelMaterialSlot::StableId materialSlotStableId)
 Create an ID that maps to a specific material slot with a corresponding stable ID and LOD.
 

Public Attributes

MaterialAssignmentLodIndex m_lodIndex = NonLodIndex
 
RPI::ModelMaterialSlot::StableId m_materialSlotStableId = RPI::ModelMaterialSlot::InvalidStableId
 

Static Public Attributes

static constexpr MaterialAssignmentLodIndex NonLodIndex = std::numeric_limits<MaterialAssignmentLodIndex>::max()
 

Detailed Description

MaterialAssignmentId is used to address available and overridable material slots on a model. The LOD and one of the model's original material slot IDs are used as coordinates that identify a specific material slot or a set of slots matching either.


The documentation for this struct was generated from the following file: