@@ -44,15 +44,13 @@ typedef struct IRadientTextureAsset IRadientTextureAsset;
4444typedef struct IRadientSceneAsset IRadientSceneAsset ;
4545typedef struct IRadientSkeletonAsset IRadientSkeletonAsset ;
4646typedef struct IRadientSkinAsset IRadientSkinAsset ;
47- typedef struct IRadientSkeletonAnimationAsset IRadientSkeletonAnimationAsset ;
4847typedef struct IRadientAnimationClipAsset IRadientAnimationClipAsset ;
4948typedef struct IRadientMorphTargetWeights IRadientMorphTargetWeights ;
5049typedef struct IDeviceContext IDeviceContext ;
5150
5251typedef struct RadientStandardMaterialDefinitionCreateInfo RadientStandardMaterialDefinitionCreateInfo ;
5352typedef struct RadientSkeletonDesc RadientSkeletonDesc ;
5453typedef struct RadientSkinDesc RadientSkinDesc ;
55- typedef struct RadientSkeletonAnimationDesc RadientSkeletonAnimationDesc ;
5654typedef struct RadientAnimationClipDesc RadientAnimationClipDesc ;
5755typedef struct RadientMorphTargetCreateInfo RadientMorphTargetCreateInfo ;
5856typedef struct RadientMorphTargetDesc RadientMorphTargetDesc ;
@@ -83,9 +81,6 @@ DILIGENT_TYPED_ENUM(RADIENT_ASSET_TYPE, Uint8)
8381 /// Immutable mapping from a mesh skin palette to skeleton joints.
8482 RADIENT_ASSET_TYPE_SKIN ,
8583
86- /// Immutable animation clip targeting a skeleton hierarchy.
87- RADIENT_ASSET_TYPE_SKELETON_ANIMATION ,
88-
8984 /// Immutable, unbound animation clip.
9085 RADIENT_ASSET_TYPE_ANIMATION_CLIP
9186};
@@ -420,51 +415,20 @@ struct RadientSceneLoadInfo
420415typedef struct RadientSceneLoadInfo RadientSceneLoadInfo ;
421416
422417
423- /// Associates one skeleton-specific animation with a logical scene animation.
424- /// The animation is retained by the scene asset and the pointer is borrowed by
425- /// callers.
426- struct RadientSceneSkeletonAnimationBinding
427- {
428- IRadientSkeletonAnimationAsset * pAnimation DEFAULT_INITIALIZER (nullptr );
429- };
430- typedef struct RadientSceneSkeletonAnimationBinding RadientSceneSkeletonAnimationBinding ;
431-
432-
433- /// Immutable logical animation imported with a scene asset.
434- ///
435- /// One source animation may contain SkeletonAnimationCount independent
436- /// skeleton animations. Every skeleton animation identifies its target through
437- /// IRadientSkeletonAnimationAsset::GetDesc().pSkeleton. Name may be empty or
438- /// shared by multiple animations; the animation index is its stable identity
439- /// within the scene asset.
440- struct RadientSceneAnimationDesc
441- {
442- /// Source animation name. The value returned by a scene asset is never null.
443- const Char * Name DEFAULT_INITIALIZER (nullptr );
444-
445- /// Clip-local duration in seconds.
446- Float32 Duration DEFAULT_INITIALIZER (0.f );
447-
448- /// Array of SkeletonAnimationCount skeleton-animation bindings. The array
449- /// and its pointers remain valid while the scene asset is retained.
450- const RadientSceneSkeletonAnimationBinding * pSkeletonAnimations DEFAULT_INITIALIZER (nullptr );
451-
452- /// Number of elements in pSkeletonAnimations.
453- Uint32 SkeletonAnimationCount DEFAULT_INITIALIZER (0 );
454- };
455- typedef struct RadientSceneAnimationDesc RadientSceneAnimationDesc ;
456-
457-
458418/// Immutable description of an imported scene asset.
459419struct RadientSceneAssetDesc
460420{
461- /// Array of AnimationCount logical animations. The array and all data
462- /// referenced by its elements remain valid while the scene asset is
463- /// retained. May be null when AnimationCount is zero.
464- const RadientSceneAnimationDesc * pAnimations DEFAULT_INITIALIZER (nullptr );
465-
466- /// Number of elements in pAnimations.
467- Uint32 AnimationCount DEFAULT_INITIALIZER (0 );
421+ /// Array of AnimationClipCount animation clips imported with the scene.
422+ /// The array and its pointers remain valid while the scene asset is
423+ /// retained. Clips preserve source-animation order, so the array index is
424+ /// the stable identity within the scene even when names are empty or
425+ /// duplicated. Individual clip name, duration, targets, and channels are
426+ /// available through IRadientAnimationClipAsset::GetDesc(). May be null
427+ /// when AnimationClipCount is zero.
428+ IRadientAnimationClipAsset * const * ppAnimationClips DEFAULT_INITIALIZER (nullptr );
429+
430+ /// Number of elements in ppAnimationClips.
431+ Uint32 AnimationClipCount DEFAULT_INITIALIZER (0 );
468432};
469433typedef struct RadientSceneAssetDesc RadientSceneAssetDesc ;
470434
@@ -625,12 +589,26 @@ DILIGENT_BEGIN_INTERFACE(IRadientAssetManager, IObject)
625589 const RadientSkinDesc REF SkinDesc ,
626590 IRadientSkinAsset * * ppSkin ) PURE ;
627591
628- /// Creates an immutable animation clip targeting a skeleton. The animation
629- /// retains the skeleton and copies all tracks, keyframe times, and values.
630- /// On success, ppAnimation receives a strong reference.
631- VIRTUAL RADIENT_STATUS METHOD (CreateSkeletonAnimation )(THIS_
632- const RadientSkeletonAnimationDesc REF AnimationDesc ,
633- IRadientSkeletonAnimationAsset * * ppAnimation ) PURE ;
592+ /// Creates an immutable, unbound animation clip.
593+ ///
594+ /// The manager validates structural and native-storage invariants and
595+ /// copies the name, descriptor tables, target names, keyframe times, and
596+ /// value bytes before returning. It does not resolve target schemas or
597+ /// validate property-specific value compatibility; those checks occur when
598+ /// the clip is bound to a runtime instance.
599+ ///
600+ /// \param [in] ClipDesc - Clip description to validate and copy. Its data
601+ /// only needs to remain valid for this call.
602+ /// \param [out] ppClip - Address of a null pointer that receives a strong
603+ /// reference on success. It remains null on failure.
604+ ///
605+ /// \return RADIENT_STATUS_OK on success, RADIENT_STATUS_INVALID_ARGUMENT
606+ /// for a malformed description or output pointer,
607+ /// RADIENT_STATUS_INVALID_OPERATION after Stop(), or
608+ /// RADIENT_STATUS_FAILED if storage creation fails.
609+ VIRTUAL RADIENT_STATUS METHOD (CreateAnimationClip )(THIS_
610+ const RadientAnimationClipDesc REF ClipDesc ,
611+ IRadientAnimationClipAsset * * ppClip ) PURE ;
634612
635613 /// Creates or retrieves a cached built-in standard material definition asset.
636614 /// Compatible descriptions may return the same immutable asset. On success,
@@ -683,26 +661,6 @@ DILIGENT_BEGIN_INTERFACE(IRadientAssetManager, IObject)
683661 VIRTUAL RADIENT_STATUS METHOD (Stop )(THIS_
684662 IDeviceContext * pContext ) PURE ;
685663
686- /// Creates an immutable, unbound animation clip.
687- ///
688- /// The manager validates structural and native-storage invariants and
689- /// copies the name, descriptor tables, target names, keyframe times, and
690- /// value bytes before returning. It does not resolve target schemas or
691- /// validate property-specific value compatibility; those checks occur when
692- /// the clip is bound to a runtime instance.
693- ///
694- /// \param [in] ClipDesc - Clip description to validate and copy. Its data
695- /// only needs to remain valid for this call.
696- /// \param [out] ppClip - Address of a null pointer that receives a strong
697- /// reference on success. It remains null on failure.
698- ///
699- /// \return RADIENT_STATUS_OK on success, RADIENT_STATUS_INVALID_ARGUMENT
700- /// for a malformed description or output pointer,
701- /// RADIENT_STATUS_INVALID_OPERATION after Stop(), or
702- /// RADIENT_STATUS_FAILED if storage creation fails.
703- VIRTUAL RADIENT_STATUS METHOD (CreateAnimationClip )(THIS_
704- const RadientAnimationClipDesc REF ClipDesc ,
705- IRadientAnimationClipAsset * * ppClip ) PURE ;
706664};
707665DILIGENT_END_INTERFACE
708666
@@ -714,14 +672,13 @@ DILIGENT_END_INTERFACE
714672# define IRadientAssetManager_CreateMesh (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateMesh, This, __VA_ARGS__)
715673# define IRadientAssetManager_CreateSkeleton (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateSkeleton, This, __VA_ARGS__)
716674# define IRadientAssetManager_CreateSkin (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateSkin, This, __VA_ARGS__)
717- # define IRadientAssetManager_CreateSkeletonAnimation (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateSkeletonAnimation , This, __VA_ARGS__)
675+ # define IRadientAssetManager_CreateAnimationClip (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateAnimationClip , This, __VA_ARGS__)
718676# define IRadientAssetManager_CreateStandardMaterialDefinition (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateStandardMaterialDefinition, This, __VA_ARGS__)
719677# define IRadientAssetManager_CreateMaterial (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateMaterial, This, __VA_ARGS__)
720678# define IRadientAssetManager_LoadTexture (This , ...) CALL_IFACE_METHOD(RadientAssetManager, LoadTexture, This, __VA_ARGS__)
721679# define IRadientAssetManager_LoadScene (This , ...) CALL_IFACE_METHOD(RadientAssetManager, LoadScene, This, __VA_ARGS__)
722680# define IRadientAssetManager_WaitForAssetLoad (This , ...) CALL_IFACE_METHOD(RadientAssetManager, WaitForAssetLoad, This, __VA_ARGS__)
723681# define IRadientAssetManager_Stop (This , ...) CALL_IFACE_METHOD(RadientAssetManager, Stop, This, __VA_ARGS__)
724- # define IRadientAssetManager_CreateAnimationClip (This , ...) CALL_IFACE_METHOD(RadientAssetManager, CreateAnimationClip, This, __VA_ARGS__)
725682
726683#endif
727684
0 commit comments