Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::IBottomLevelAS Struct Referenceabstract

Bottom-level AS interface. More...

#include <BottomLevelAS.h>

Inheritance diagram for Diligent::IBottomLevelAS:
Diligent::IDeviceObject Diligent.IObject Diligent::IBottomLevelASD3D12 Diligent::IBottomLevelASMtl Diligent::IBottomLevelASVk

Public Member Functions

virtual const BottomLevelASDesc &DILIGENT_CALL_TYPE GetDesc () const override=0
 Returns the bottom level AS description used to create the object.
 
virtual Uint32 DILIGENT_CALL_TYPE GetGeometryDescIndex (const Char *Name) const =0
 Returns the geometry description index in BottomLevelASDesc::pTriangles or BottomLevelASDesc::pBoxes.
 
virtual Uint32 DILIGENT_CALL_TYPE GetGeometryIndex (const Char *Name) const =0
 Returns the geometry index that can be used in a shader binding table.
 
virtual Uint32 DILIGENT_CALL_TYPE GetActualGeometryCount () const =0
 
virtual ScratchBufferSizes DILIGENT_CALL_TYPE GetScratchBufferSizes () const =0
 Returns the scratch buffer info for the current acceleration structure.
 
virtual Uint64 DILIGENT_CALL_TYPE GetNativeHandle ()=0
 Returns the native acceleration structure handle specific to the underlying graphics API.
 
virtual void DILIGENT_CALL_TYPE SetState (RESOURCE_STATE State)=0
 Sets the acceleration structure usage state.
 
virtual RESOURCE_STATE DILIGENT_CALL_TYPE GetState () const =0
 Returns the internal acceleration structure state.
 
- Public Member Functions inherited from Diligent::IDeviceObject
virtual Int32 DILIGENT_CALL_TYPE GetUniqueID () const =0
 Returns unique identifier assigned to an object.
 
virtual void DILIGENT_CALL_TYPE SetUserData (IObject *pUserData)=0
 Stores a pointer to the user-provided data object.
 
virtual IObject *DILIGENT_CALL_TYPE GetUserData () const =0
 Returns a pointer to the user data object previously set with SetUserData() method.
 
- Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
 
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0
 

Detailed Description

Bottom-level AS interface.

Defines the methods to manipulate a BLAS object

Member Function Documentation

◆ GetActualGeometryCount()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::GetActualGeometryCount ( ) const
pure virtual

Returns the geometry count that was used to build AS. Same as BuildBLASAttribs::TriangleDataCount or BuildBLASAttribs::BoxDataCount.

Returns
The number of geometries that was used to build AS.
Note
Access to the BLAS must be externally synchronized.

◆ GetGeometryDescIndex()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::GetGeometryDescIndex ( const Char * Name) const
pure virtual

Returns the geometry description index in BottomLevelASDesc::pTriangles or BottomLevelASDesc::pBoxes.

Parameters
[in]Name- Geometry name that is specified in BLASTriangleDesc or BLASBoundingBoxDesc.
Returns
Geometry index or INVALID_INDEX if geometry does not exist.
Note
Access to the BLAS must be externally synchronized.

◆ GetGeometryIndex()

virtual Uint32 DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::GetGeometryIndex ( const Char * Name) const
pure virtual

Returns the geometry index that can be used in a shader binding table.

Parameters
[in]Name- Geometry name that is specified in BLASTriangleDesc or BLASBoundingBoxDesc.
Returns
Geometry index or INVALID_INDEX if geometry does not exist.
Note
Access to the BLAS must be externally synchronized.

◆ GetNativeHandle()

virtual Uint64 DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::GetNativeHandle ( )
pure virtual

Returns the native acceleration structure handle specific to the underlying graphics API.

Returns
pointer to ID3D12Resource interface, for D3D12 implementation
VkAccelerationStructure handle, for Vulkan implementation

◆ GetScratchBufferSizes()

virtual ScratchBufferSizes DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::GetScratchBufferSizes ( ) const
pure virtual

Returns the scratch buffer info for the current acceleration structure.

Returns
ScratchBufferSizes object, see Diligent::ScratchBufferSizes.

◆ SetState()

virtual void DILIGENT_CALL_TYPE Diligent::IBottomLevelAS::SetState ( RESOURCE_STATE State)
pure virtual

Sets the acceleration structure usage state.

Note
This method does not perform state transition, but resets the internal acceleration structure state to the given value. This method should be used after the application finished manually managing the acceleration structure state and wants to hand over state management back to the engine.