SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::FilePack Class Reference

FilePack Class. This class defines file type mesh pack. More...

#include <MeshPack.h>

Inheritance diagram for Spices::FilePack:
Spices::MeshPack

Public Member Functions

 FilePack (const std::string &filePath, bool instanced=true)
 Constructor Function. Init member variables.
 
virtual ~FilePack () override=default
 Destructor Function.
 
virtual bool OnCreatePack (bool isCreateBuffer=true) override
 This interface is used for build specific mesh pack data.
 
void SetMaterial (const std::string &materialPath)
 Set specific material for this class.
 
void SetMaterial (std::shared_ptr< Material > material)
 Set specific material for this class.
 
std::shared_ptr< MaterialGetMaterial ()
 Get material in this class.
 
void SetHitShaderHandle (uint32_t handle)
 Set hit shader Handle.
 
void SetShaderGroupHandle (uint32_t handle)
 Set hit shader Handle.
 
uint32_t GetHitShaderHandle () const
 Get Hit Shader Handle, which accessed by ray gen shader.
 
uint32_t GetShaderGroupHandle () const
 Get ShaderGroup Handle, which accessed by gdc buffer.
 
UUID GetUUID () const
 Get mesh pack UUID.
 
void OnBind (const VkCommandBuffer &commandBuffer) const
 Bind VBO and EBO.
 
void OnDraw (const VkCommandBuffer &commandBuffer) const
 Draw indexed.
 
void OnDrawMeshTasks (const VkCommandBuffer &commandBuffer) const
 Draw Mesh Tasks.
 
const std::vector< Meshlet > & GetMeshlets () const
 Get Meshlets array.
 
uint32_t GetNTasks () const
 Get NTasks.
 
MeshDescGetMeshDesc ()
 Get Mesh Description.
 
const VkDrawMeshTasksIndirectCommandNV & GetDrawCommand () const
 Get Draw Command.
 
const std::string & GetPackType () const
 Get Pack Type.
 
VulkanRayTracing::BlasInput MeshPackToVkGeometryKHR ()
 Convert MeshPack into the ray tracing geometry used to build the BLAS.
 
bool HasBlasAccel ()
 Is this meshPack has a valid blas.
 
AccelKHRGetAccel ()
 Get this accel.
 
const MeshResourceGetResource () const
 Get Resource.
 

Protected Member Functions

void CreateBuffer ()
 Create Vertices buffer anf Indices buffer.
 

Protected Attributes

std::string m_MeshPackName
 MeshPack Name.
 
bool m_Instanced
 If this mesh pack needs instanced.
 
MeshResource m_MeshResource
 Mesh Resources.
 
uint32_t m_NTasks
 Task Shader Work Group Size.
 
std::shared_ptr< Materialm_Material
 specific material pointer.
 
std::optional< std::atomic_uint32_t > m_HitShaderHandle
 specific hit shader handle. Used in RayTracing Pipeline.
 
std::optional< std::atomic_uint32_t > m_ShaderGroupHandle
 specific shader group handle. Used in IndirectDGCPipeline.
 
MeshDesc m_Desc
 Mesh Description.
 
std::string m_PackType
 specific mesh pack type.
 
AccelKHR m_Accel
 This meshPack blas accel.
 
std::atomic_bool m_IsRequiredAccel
 True if required accel by BLAS Build.
 
UUID m_UUID
 UUID for mesh pack.
 
VkDrawMeshTasksIndirectCommandNV m_MeshTaskIndirectDrawCommand {}
 Draw Command.
 

Private Attributes

std::string m_Path
 The mesh file path in disk.
 

Detailed Description

FilePack Class. This class defines file type mesh pack.

Definition at line 541 of file MeshPack.h.


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