Open 3D Engine AzFramework 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.
Physics::MaterialAsset Class Reference

#include <PhysicsMaterialAsset.h>

Inherits AZ::Data::AssetData.

Public Types

using MaterialProperties = AZStd::unordered_map< AZStd::string, MaterialPropertyValue >
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (Physics::MaterialAsset, AZ::SystemAllocator)
 
 AZ_RTTI (Physics::MaterialAsset, "{E4EF58EE-B1D1-46C8-BE48-BB62B8247386}", AZ::Data::AssetData)
 
void SetData (const AZStd::string &materialType, AZ::u32 version, const MaterialProperties &materialProperties)
 
const AZStd::string & GetMaterialType () const
 
AZ::u32 GetVersion () const
 
const MaterialProperties & GetMaterialProperties () const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

static constexpr const char * FileExtension = "physicsmaterial"
 
static constexpr const char * AssetGroup = "Physics Material"
 
static constexpr AZ::u32 AssetSubId = 1
 

Protected Attributes

AZStd::string m_materialType
 
AZ::u32 m_version = 0
 
MaterialProperties m_materialProperties
 List of material properties.
 

Detailed Description

MaterialAsset defines a single material, which includes all the properties to create a Material instance to use at runtime. This physics material asset is generic and independent from the physics backend used.

Member Function Documentation

◆ SetData()

void Physics::MaterialAsset::SetData ( const AZStd::string &  materialType,
AZ::u32  version,
const MaterialProperties &  materialProperties 
)

Sets the data for this material asset and marks it as ready. This is necessary to be called when creating an in-memory material asset.

Member Data Documentation

◆ m_materialType

AZStd::string Physics::MaterialAsset::m_materialType
protected

String that identifies the type of the material. Each physics backend must provide a different one.

◆ m_version

AZ::u32 Physics::MaterialAsset::m_version = 0
protected

Version number of the material. Used to identify changes in the properties.


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