Open 3D Engine AzFramework API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Physics::MaterialId Struct Reference

Class that is used to identify a material. More...

#include <PhysicsMaterialId.h>

Public Member Functions

 AZ_TYPE_INFO (Physics::MaterialId, "{30DED897-0E19-40B7-9BE1-0E92CBD307F9}")
 
 MaterialId ()=default
 Create a null id by default.
 
 MaterialId (const AZ::Uuid &guid)
 
 MaterialId (const AZ::Uuid &guid, uint32_t subId)
 
bool IsValid () const
 
bool operator== (const MaterialId &rhs) const
 
bool operator!= (const MaterialId &rhs) const
 
template<class StringType >
StringType ToString () const
 
template<class StringType >
void ToString (StringType &result) const
 

Static Public Member Functions

static MaterialId CreateFromAssetId (const AZ::Data::AssetId &assetId)
 
static MaterialId CreateName (const char *name)
 Creates an InstanceId by hashing the provided name.
 
static MaterialId CreateData (const void *data, size_t dataSize)
 Creates an InstanceId by hashing the provided data.
 
static MaterialId CreateRandom ()
 Creates a random id.
 

Public Attributes

AZ::Uuid m_guid = AZ::Uuid::CreateNull()
 
uint32_t m_subId = 0
 

Detailed Description

Class that is used to identify a material.

Member Function Documentation

◆ CreateFromAssetId()

static MaterialId Physics::MaterialId::CreateFromAssetId ( const AZ::Data::AssetId &  assetId)
static

Creates an instance id from an asset id. The two will share the same guid and sub id. This is an explicit create method rather than a constructor in order to make it explicit.


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