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

#include <RadientAnimation.h>

Inheritance diagram for Diligent::IRadientAnimationDestinationBinding:
Diligent.IObject

Public Member Functions

virtual RADIENT_STATUS DILIGENT_CALL_TYPE BeginUpdate (void *const **ppOutputs)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE EndUpdate (Bool UpdateDerivedState)=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

Destination-owned compiled plan for one ordered property batch.

The object retains its parent destination and owns every destination-specific lookup table or snapshot required by the plan. It is externally synchronized. If an element is destroyed after binding, it must never be silently replaced by a newly created element; BeginUpdate() returns RADIENT_STATUS_NOT_FOUND, and the caller recreates the outer binding.

Member Function Documentation

◆ BeginUpdate()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAnimationDestinationBinding::BeginUpdate ( void *const ** ppOutputs)
pure virtual

Begins one direct-write update and returns its ordered output addresses.

ppOutputs must be non-null. On success, *ppOutputs receives a borrowed, non-null array containing exactly one writable address for every property accepted when this object was created, in supported-request order. Each address is non-null, naturally aligned for the property's native type, and exposes the complete tightly packed byte range described by the corresponding RadientAnimationPropertyBindingDesc::Value. Property ranges do not overlap because CreateBinding() rejects aliases.

The caller writes one complete value to every returned address before calling EndUpdate(). Values must satisfy the resolved schema contract; the destination is not required to validate or normalize them. State outside the bound property ranges is not writable through the returned array and is preserved.

Implementations may expose destination storage directly or return destination-owned staging storage for properties that cannot be written in place. Implementations may refresh or pin relocatable storage during this call. The output array and every address in it remain valid only until the matching EndUpdate() returns and must not be retained by the caller. While the bracket is open, the caller must not mutate the underlying destination except by writing the returned property ranges; in particular, it must not destroy elements or perform operations that may relocate the exposed storage.

A successful call opens an update bracket and must be followed by exactly one EndUpdate() call before BeginUpdate() is called again. On failure, no bracket is opened and *ppOutputs is set to 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 writable outputs were acquired, RADIENT_STATUS_NOT_FOUND when a bound element no longer exists, or another negative status on failure.

◆ EndUpdate()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAnimationDestinationBinding::EndUpdate ( Bool UpdateDerivedState)
pure virtual

Ends the active direct-write update.

The caller must invoke this method exactly once after each successful BeginUpdate(), after writing every output value. UpdateDerivedState requests one destination-specific derived-state update after the complete property batch has been written. For example, a skeleton-pose destination propagates global transforms once for the complete joint batch when it is true, while a scene-writer destination commits pending scene-derived state once. When false, the destination must preserve the primary writes and may leave derived state dirty for a later aggregate update.

A destination that returned staging storage from BeginUpdate() publishes those values during this call. Primary writes are not transactional: a negative return value may leave some or all values applied, and rollback is not required. The active bracket is closed and all output addresses expire when this method returns, regardless of its status.

Applying several bindings to the same underlying state is ordered overwrite, not blending. A future player may instead bind clips to a mixer or root-motion collector that implements IRadientAnimationDestination. Implementations return only RADIENT_STATUS_OK or a negative status; other nonnegative statuses are not valid for this method.

Returns
RADIENT_STATUS_OK when the update was completed, or a negative status on failure.