Open 3D Engine Atom 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::RPI::ModelLodAsset::Mesh Class Referencefinal

#include <ModelLodAsset.h>

Classes

struct  StreamBufferInfo
 

Public Member Functions

 AZ_TYPE_INFO (Mesh, "{55A91F9A-2F71-4B75-B2F7-565087DD2DBD}")
 
 AZ_CLASS_ALLOCATOR (Mesh, AZ::SystemAllocator)
 
uint32_t GetVertexCount () const
 Returns the number of vertices in this mesh.
 
uint32_t GetIndexCount () const
 Returns the number of indices in this mesh.
 
ModelMaterialSlot::StableId GetMaterialSlotId () const
 
const AZ::Name & GetName () const
 Returns the name of this mesh.
 
const AZ::Aabb & GetAabb () const
 Returns the model-space axis-aligned bounding box of the mesh.
 
const BufferAssetViewGetIndexBufferAssetView () const
 Returns a reference to the index buffer used by this mesh.
 
template<class T >
AZStd::span< const T > GetIndexBufferTyped () const
 
AZStd::span< const StreamBufferInfoGetStreamBufferInfoList () const
 Return an array view of the list of all stream buffer info (not including the index buffer)
 
const BufferAssetViewGetSemanticBufferAssetView (const AZ::Name &semantic) const
 
template<class T >
AZStd::span< const T > GetSemanticBufferTyped (const AZ::Name &semantic) const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Friends

class ModelLodAssetCreator
 

Detailed Description

Associates stream views (vertex buffer views and an index buffer view) with material data. A ModelLodAsset::Mesh can have many Streams but only one material id.

Member Function Documentation

◆ GetIndexBufferTyped()

template<class T >
AZStd::span< const T > AZ::RPI::ModelLodAsset::Mesh::GetIndexBufferTyped ( ) const

A helper method for returning this mesh's index buffer using a specific type for the elements.

Note
It's the caller's responsibility to choose the right type for the buffer.

◆ GetMaterialSlotId()

ModelMaterialSlot::StableId AZ::RPI::ModelLodAsset::Mesh::GetMaterialSlotId ( ) const

Returns the ID of the material slot used by this mesh. This maps into the ModelAsset's material slot list.

◆ GetSemanticBufferAssetView()

const BufferAssetView * AZ::RPI::ModelLodAsset::Mesh::GetSemanticBufferAssetView ( const AZ::Name &  semantic) const

A helper method for returning a specific buffer asset view. It will return nullptr if the semantic buffer is not found. For example, to get a position buffer for a mesh with AZ::Name("POSITION"). In perf loop, re-use AZ::Name instance.

◆ GetSemanticBufferTyped()

template<class T >
AZStd::span< const T > AZ::RPI::ModelLodAsset::Mesh::GetSemanticBufferTyped ( const AZ::Name &  semantic) const

A helper method for returning this mesh's buffer using a specific type for the elements. For example, to get a position buffer for a mesh with AZ::Name("POSITION") and T=float. In perf loop, re-use AZ::Name instance.

Note
It's the caller's responsibility to choose the right type for the buffer.

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