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

#include <RadientAnimation.h>

Inheritance diagram for Diligent::IRadientAnimationDestination:
Diligent.IObject

Public Member Functions

virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateBinding (const RadientAnimationPropertyBindingDesc *pProperties, Uint32 PropertyCount, RadientAnimationResolvedPropertyDesc *pResolvedProperties, IRadientAnimationDestinationBinding **ppBinding)=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

Factory for destination-specific compiled animation bindings.

This interface is the only runtime extension point required by the generic animation system. Radient-created skeleton poses expose it through QueryInterface() for node translation, rotation, and scale properties. Radient-created scene writers expose those properties plus node own visibility, RadientLightAnimationSchemaID, and RadientCameraAnimationSchemaID for scene entities. Radient-created morph-target weight objects expose it for morph-weight array ranges. Custom destinations may implement it for material, application, or extension properties. The interface is externally synchronized.

Destination binding creation is a cold operation. The returned object owns any optimized element/property lookup tables and releases them with ordinary IObject lifetime management. Applying values uses one hot BeginUpdate()/EndUpdate() virtual-call pair on that object per evaluation, never one call per element or property.

Member Function Documentation

◆ CreateBinding()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAnimationDestination::CreateBinding ( const RadientAnimationPropertyBindingDesc * pProperties,
Uint32 PropertyCount,
RadientAnimationResolvedPropertyDesc * pResolvedProperties,
IRadientAnimationDestinationBinding ** ppBinding )
pure virtual

Compiles the supported subset of an ordered property-range batch.

pProperties contains PropertyCount requests derived from every channel mapped to this destination descriptor. pResolvedProperties contains the same number of output records in corresponding order. PropertyCount must be nonzero and both pointers must be non-null. ppBinding must be non-null and *ppBinding must be null.

The implementation first resets every resolved output to UNKNOWN semantic. On success, every supported request receives the semantic needed to interpolate it, while unsupported schema/property requests remain UNKNOWN. The output index of a supported request is its zero-based ordinal among supported results in request order. ppBinding receives a strong reference to an IRadientAnimationDestinationBinding that retains this destination and owns the compiled plan for the supported requests. This method does not retain either caller-owned array.

For example, if three requests resolve to COMPONENT_WISE, UNKNOWN, and NORMALIZED_QUATERNION, BeginUpdate() returns two output addresses: slot 0 for the first request and slot 1 for the third. The unsupported middle request has no output slot.

Unsupported requests are not failures and do not receive destination storage. All other validation remains all-or-nothing: the implementation rejects malformed requests, incompatible layouts for supported properties, and requests that resolve to overlapping physical storage, even when different schemas or property IDs alias that storage. Outputs are unspecified on failure other than RADIENT_STATUS_UNSUPPORTED, which leaves every result reset to its unbound state.

Returns RADIENT_STATUS_UNSUPPORTED without creating a binding when none of the requests use a schema/property exposed by this destination, RADIENT_STATUS_NOT_FOUND when a referenced runtime element for a supported request no longer exists, and RADIENT_STATUS_INVALID_ARGUMENT for malformed input or a layout incompatible with a supported property.

On failure, *ppBinding remains null. Implementations return only RADIENT_STATUS_OK or a negative status; other nonnegative statuses are not valid for this method.

Returns
RADIENT_STATUS_OK when at least one request was compiled, RADIENT_STATUS_UNSUPPORTED when no request was supported, or another negative RADIENT_STATUS value on failure.