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

#include <RadientMeshImportServices.h>

Inheritance diagram for Diligent::IRadientMeshImportServices:
Diligent.IObject

Public Member Functions

virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMeshVertexData (const RadientMeshVertexData &VertexData, IRadientMeshVertexData **ppVertexData)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMeshIndexData (const RadientMeshIndexData &IndexData, IRadientMeshIndexData **ppIndexData)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMeshMorphTargetData (const RadientMeshMorphTargetData &MorphTargetData, Uint32 VertexCount, IRadientMeshMorphTargetData **ppMorphTargetData)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMeshView (const RadientMeshViewCreateInfo &ViewCI, IRadientMeshAsset **ppMesh)=0
Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type>
void QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface)
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

Mesh-data creation services supplied to scene asset importer implementations.

Each service is associated with an asset manager. It creates immutable data handles that importers can share independently across mesh geometries and assembles those geometries into mesh assets. The associated asset manager's WaitForAssetLoad accepts both the data handles and the resulting mesh assets. The service retains its associated asset manager. These methods can be called concurrently; stopping the manager prevents new creation requests.

Member Function Documentation

◆ CreateMeshIndexData()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMeshImportServices::CreateMeshIndexData ( const RadientMeshIndexData & IndexData,
IRadientMeshIndexData ** ppIndexData )
pure virtual

Creates reusable, immutable index data from a tightly packed source blob.

The blob is retained with shared read access before returning. Source UINT8, UINT16, and UINT32 encodings are accepted; the renderer selects the stored encoding. Data can be used by CreateMeshView while loading is pending.

Parameters
[in]IndexData- Source data; see RadientMeshIndexData.
[out]ppIndexData- Address of a null pointer that receives a strong reference when an asset is created. Synchronous validation failures leave the pointer null. A scheduling failure may return a failed asset; release any non-null output.
Returns
RADIENT_STATUS_OK if CPU processing is complete, or RADIENT_STATUS_PENDING if it continues asynchronously. Neither guarantees GPU readiness. WaitForAssetLoad reports later source errors. Invalid descriptions return RADIENT_STATUS_INVALID_ARGUMENT; an active blob writer or a stopped manager returns RADIENT_STATUS_INVALID_OPERATION.

◆ CreateMeshMorphTargetData()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMeshImportServices::CreateMeshMorphTargetData ( const RadientMeshMorphTargetData & MorphTargetData,
Uint32 VertexCount,
IRadientMeshMorphTargetData ** ppMorphTargetData )
pure virtual

Creates reusable, immutable morph-target data for a vertex domain.

All descriptions, strings, and delta values are copied before returning. Data can be used by CreateMeshView while loading is pending.

Parameters
[in]MorphTargetData- Source targets; see RadientMeshMorphTargetData. MorphTargetCount must be nonzero.
[in]VertexCount- Number of vertex deltas per attribute. Must be nonzero and match each geometry that uses the data.
[out]ppMorphTargetData- Address of a null pointer that receives a strong reference when an asset is created. Synchronous validation failures leave it null. A scheduling failure may return a failed asset; release any non-null output.
Returns
RADIENT_STATUS_OK if CPU processing is complete, or RADIENT_STATUS_PENDING if it continues asynchronously. Neither guarantees GPU readiness. WaitForAssetLoad reports later source errors. Invalid descriptions return RADIENT_STATUS_INVALID_ARGUMENT; a stopped manager returns RADIENT_STATUS_INVALID_OPERATION.

◆ CreateMeshVertexData()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMeshImportServices::CreateMeshVertexData ( const RadientMeshVertexData & VertexData,
IRadientMeshVertexData ** ppVertexData )
pure virtual

Creates reusable, immutable vertex data from a source layout and blobs.

Layout arrays and strings are copied and source blobs are retained with shared read access before returning. The renderer chooses the stored layout. Data can be used by CreateMeshView while loading is pending.

Parameters
[in]VertexData- Source data; see RadientMeshVertexData.
[out]ppVertexData- Address of a null pointer that receives a strong reference when an asset is created. Synchronous validation failures leave the pointer null. A scheduling failure may return a failed asset; release any non-null output.
Returns
RADIENT_STATUS_OK if CPU processing is complete, or RADIENT_STATUS_PENDING if it continues asynchronously. Neither guarantees GPU readiness. WaitForAssetLoad reports later source errors. Invalid descriptions return RADIENT_STATUS_INVALID_ARGUMENT; active blob writers or a stopped manager return RADIENT_STATUS_INVALID_OPERATION.

◆ CreateMeshView()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMeshImportServices::CreateMeshView ( const RadientMeshViewCreateInfo & ViewCI,
IRadientMeshAsset ** ppMesh )
pure virtual

Creates a mesh view over geometry data belonging to the associated asset manager.

The primitive descriptions, names, and geometry mapping are copied, and used geometry handles and materials are retained, before returning. The geometry data may still be loading. The view shares its existing storage; creating another view does not repack or reupload its vertex or index data.

Parameters
[in]ViewCI- Primitive ranges and geometry; see RadientMeshViewCreateInfo.
[out]ppMesh- Address of a null pointer that receives a strong reference when an asset is created. Synchronous validation failures leave the pointer null. A scheduling failure may return a failed asset; release any non-null output.
Returns
RADIENT_STATUS_OK if CPU processing is complete, or RADIENT_STATUS_PENDING if it continues asynchronously. Neither guarantees GPU readiness. Invalid descriptors or geometry handles return RADIENT_STATUS_INVALID_ARGUMENT; a stopped manager returns RADIENT_STATUS_INVALID_OPERATION. Primitive ranges and morph-target compatibility are checked after geometry processing; use WaitForAssetLoad to observe deferred validation failures.