#include <PhysicsMaterialSlots.h>
|
| AZ_CLASS_ALLOCATOR (Physics::MaterialSlots, AZ::SystemAllocator) |
|
| AZ_RTTI (Physics::MaterialSlots, "{8A0D64CB-C98E-42E3-96A9-B81D7118CA6F}") |
|
| MaterialSlots () |
| Contstructor will already provide a valid default slot.
|
|
void | SetSlots (MaterialDefaultSlot) |
|
void | SetSlots (const AZStd::vector< AZStd::string > &slots) |
|
void | SetMaterialAsset (size_t slotIndex, const AZ::Data::Asset< MaterialAsset > &materialAsset) |
| Sets a material asset to a specific slot.
|
|
size_t | GetSlotsCount () const |
| Returns the number of slots.
|
|
AZStd::string_view | GetSlotName (size_t slotIndex) const |
| Returns the name of a specific slot.
|
|
AZStd::vector< AZStd::string > | GetSlotsNames () const |
| Returns the names of all slots.
|
|
const AZ::Data::Asset< MaterialAsset > | GetMaterialAsset (size_t slotIndex) const |
|
void | SetSlotsReadOnly (bool readOnly) |
| Set if the material slots are editable in the edit context.
|
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
|
static const char *const | EntireObjectSlotName |
|
The class is used to store a list of material assets. Each material will be assigned to a slot and when reflected to edit context it will show it for each slot entry.
◆ GetMaterialAsset()
const AZ::Data::Asset< MaterialAsset > Physics::MaterialSlots::GetMaterialAsset |
( |
size_t |
slotIndex | ) |
const |
Returns the material assigned assigned to a specific slots. A slot can have no asset assigned, in which case it will return a null asset.
◆ SetSlots() [1/2]
void Physics::MaterialSlots::SetSlots |
( |
const AZStd::vector< AZStd::string > & |
slots | ) |
|
Sets an array of material slots. It will resize the material slots but without reassigning the material assets in them.
- Parameters
-
slots | List of labels for slots. It can be empty, in which case it's the same as calling SetSlots(MaterialDefaultSlot::Default). |
◆ SetSlots() [2/2]
void Physics::MaterialSlots::SetSlots |
( |
MaterialDefaultSlot |
| ) |
|
Sets one material slot with the default label "Entire Object". It will resize the material slots but without reassigning the material assets in them.
The documentation for this class was generated from the following file:
- Code/Framework/AzFramework/AzFramework/Physics/Material/PhysicsMaterialSlots.h