Open 3D Engine Atom Gem API Reference 26.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Render::ModelDataInstance Class Reference

Inherits AZ::Render::ModelDataInstanceInterface.

Public Types

using InstanceGroupHandle = StableDynamicArrayWeakHandle< MeshInstanceGroupData >
 
using PostCullingInstanceDataList = AZStd::vector< PostCullingInstanceData >
 

Public Member Functions

 AZ_RTTI (AZ::Render::ModelDataInstance, "{AF38DCED-9692-4B88-8738-9710BA70F49C}", AZ::Render::ModelDataInstanceInterface)
 
const Data::Instance< RPI::Model > & GetModel () override
 
const Data::Asset< RPI::ModelAsset > & GetProductModelAsset () override
 
const RPI::CullableGetCullable () override
 
const uint32_t GetLightingChannelMask () override
 
MeshInfoHandle GetMeshInfoHandle (size_t modelLodIndex, size_t meshIndex) const override
 
int32_t GetMeshInfoIndex (size_t modelLodIndex, size_t meshIndex) const override
 
const bool IsSkinnedMesh () override
 
const AZ::Uuid & GetRayTracingUuid () const override
 
const TransformServiceFeatureProcessorInterface::ObjectId GetObjectId () const override
 
void HandleDrawPacketUpdate (uint32_t lodIndex, uint32_t meshIndex, RPI::MeshDrawPacket &meshDrawPacket) override
 Internally called when a DrawPacket used by this ModelDataInstance was updated.
 
void ConnectMeshDrawPacketUpdatedHandler (MeshDrawPacketUpdatedEvent::Handler &handler) override
 
CustomMaterialInfo GetCustomMaterialWithFallback (const CustomMaterialId &id) const override
 

Friends

class MeshFeatureProcessor
 
class MeshLoader
 

Member Function Documentation

◆ ConnectMeshDrawPacketUpdatedHandler()

void AZ::Render::ModelDataInstance::ConnectMeshDrawPacketUpdatedHandler ( MeshDrawPacketUpdatedEvent::Handler &  handler)
overridevirtual

Connects @handler to the MeshDrawPacketUpdatedEvent. One of the most common reasons a MeshDrawPacket gets updated is when a RenderPipeline is instantiated at runtime and it happens to contain a RasterPass with a DrawListTag that matches one of the Shaders of one of the Materials in a Mesh. Another scenario is when Shader assets or Material assets are reloaded.

Implements AZ::Render::ModelDataInstanceInterface.

◆ GetCullable()

const RPI::Cullable & AZ::Render::ModelDataInstance::GetCullable ( )
inlineoverridevirtual

◆ GetCustomMaterialWithFallback()

CustomMaterialInfo AZ::Render::ModelDataInstance::GetCustomMaterialWithFallback ( const CustomMaterialId &  id) const
overridevirtual

◆ GetLightingChannelMask()

const uint32_t AZ::Render::ModelDataInstance::GetLightingChannelMask ( )
inlineoverridevirtual

◆ GetMeshInfoHandle()

MeshInfoHandle AZ::Render::ModelDataInstance::GetMeshInfoHandle ( size_t  modelLodIndex,
size_t  meshIndex 
) const
overridevirtual

◆ GetMeshInfoIndex()

int32_t AZ::Render::ModelDataInstance::GetMeshInfoIndex ( size_t  modelLodIndex,
size_t  meshIndex 
) const
overridevirtual

◆ GetModel()

const Data::Instance< RPI::Model > & AZ::Render::ModelDataInstance::GetModel ( )
inlineoverridevirtual

◆ GetObjectId()

const TransformServiceFeatureProcessorInterface::ObjectId AZ::Render::ModelDataInstance::GetObjectId ( ) const
inlineoverridevirtual

◆ GetProductModelAsset()

const Data::Asset< RPI::ModelAsset > & AZ::Render::ModelDataInstance::GetProductModelAsset ( )
inlineoverridevirtual

If this is a skinned mesh, ProductModelAssetId is the asset-id of the original, non-animated asset. Returns a invalid Asset for non-skinned meshes.

Implements AZ::Render::ModelDataInstanceInterface.

◆ GetRayTracingUuid()

const AZ::Uuid & AZ::Render::ModelDataInstance::GetRayTracingUuid ( ) const
inlineoverridevirtual

◆ HandleDrawPacketUpdate()

void AZ::Render::ModelDataInstance::HandleDrawPacketUpdate ( uint32_t  lodIndex,
uint32_t  meshIndex,
RPI::MeshDrawPacket meshDrawPacket 
)
overridevirtual

Internally called when a DrawPacket used by this ModelDataInstance was updated.

Implements AZ::Render::ModelDataInstanceInterface.

◆ IsSkinnedMesh()

const bool AZ::Render::ModelDataInstance::IsSkinnedMesh ( )
inlineoverridevirtual

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