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

#include <RadientMorphTargets.h>

Inheritance diagram for Diligent::IRadientMorphTargetWeights:
Diligent.IObject

Public Member Functions

virtual IRadientMeshAsset *DILIGENT_CALL_TYPE GetMesh () const =0
 Returns a borrowed pointer to the mesh that defines the targets.
virtual Uint64 DILIGENT_CALL_TYPE GetVersion () const =0
virtual Uint32 DILIGENT_CALL_TYPE GetWeightCount () const =0
 Returns the fixed number of weights and mesh morph targets.
virtual const Float32 *DILIGENT_CALL_TYPE GetWeights () const =0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE SetWeights (Uint32 FirstTarget, Uint32 WeightCount, const Float32 *pWeights)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE ResetToDefaults ()=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

Mutable weights for the morph targets owned by one mesh.

The weight count is fixed at creation. The object retains its mesh and is not thread-safe; callers must not read and write it concurrently. Weight values are copied without clamping or per-value validation. The caller is responsible for providing finite values. Querying IID_RadientAnimationDestination exposes RadientMorphWeightsProperty as component-wise FLOAT ranges on destination element zero.

Member Function Documentation

◆ GetVersion()

virtual Uint64 DILIGENT_CALL_TYPE Diligent::IRadientMorphTargetWeights::GetVersion ( ) const
pure virtual

Returns the monotonically increasing weight revision. Every successful nonempty SetWeights() call and every completed animation update batch advances the revision, including assignments whose values happen to equal the current values.

◆ GetWeights()

virtual const Float32 *DILIGENT_CALL_TYPE Diligent::IRadientMorphTargetWeights::GetWeights ( ) const
pure virtual

Returns a borrowed pointer to GetWeightCount() values, or null when the count is zero. The pointer remains valid for the object lifetime, while its contents may be changed by SetWeights(), ResetToDefaults(), or an animation destination binding.

◆ ResetToDefaults()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMorphTargetWeights::ResetToDefaults ( )
pure virtual

Restores every weight to the default declared by its mesh morph target. A nonempty reset advances the revision even when all current values already equal their defaults. Returns RADIENT_STATUS_NO_CHANGE when the mesh has no morph targets.

◆ SetWeights()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientMorphTargetWeights::SetWeights ( Uint32 FirstTarget,
Uint32 WeightCount,
const Float32 * pWeights )
pure virtual

Replaces WeightCount values beginning at FirstTarget. The input is copied immediately. Returns RADIENT_STATUS_NO_CHANGE when WeightCount is zero and RADIENT_STATUS_INVALID_ARGUMENT when the range is invalid or pWeights is null for a nonempty range.