Classes

Assets/Animations

Brief descriptions

Structures

nau::AnimationDataDescriptor

Describes animation data.

nau::FrameEventData

Encapsulates frame event data as present in animation asset.

nau::FrameData

Encapsulates a collection of events attached to the frame as present in animation asset.

nau::IAnimationAssetAccessor

Provides access the data from an animation asset.

nau::assets::AnimationAssetTag

Detailed information

AnimationDataDescriptor

engine/core/modules/assets/include/nau/assets/animation_asset_accessor.h

struct AnimationDataDescriptor

Describes animation data.

Public Types

enum class DataType

Enumerates animated parameter types that are supported by animation assets.

Values:

enumerator Unsupported
enumerator Translation
enumerator Rotation
enumerator Scale
enumerator Skeletal
enum class InterpolationType

Enumerates methods to interpolate animated values between keyframes.

Values:

enumerator No
enumerator Linear

Public Functions

inline bool operator==(const AnimationDataDescriptor &other) const
inline bool operator!=(const AnimationDataDescriptor &other) const

Public Members

size_t animationIndex = 0
size_t channelIndex = 0
DataType dataType = DataType::Unsupported
InterpolationType interpolation = InterpolationType::No
eastl::string name

FrameEventData

engine/core/modules/assets/include/nau/assets/animation_asset_accessor.h

struct FrameEventData

Encapsulates frame event data as present in animation asset.

See FrameEvent.

Public Members

eastl::string name

Event string identifier.

int eventType

Event activation type.

See FrameEventType.

int activationDirection

Event activation direction.

See FrameEventActivationDirection.


FrameData

engine/core/modules/assets/include/nau/assets/animation_asset_accessor.h

struct FrameData

Encapsulates a collection of events attached to the frame as present in animation asset.

See Frame.

Public Members

int frame
eastl::vector<FrameEventData> events

IAnimationAssetAccessor

engine/core/modules/assets/include/nau/assets/animation_asset_accessor.h

struct IAnimationAssetAccessor : public nau::IAssetAccessor

Provides access the data from an animation asset.

Public Types

using TTimesContainer = eastl::vector<float>

A type of keframes timestamps collection.

template<typename TData>
using TDataContainer = eastl::vector<TData>

A type of per-keyframe data extracted from the asset.

Public Functions

virtual IAssetAccessor AnimationDataDescriptor getDataDescriptor () const =0

Retrieves animation description from the asset.

Returns:

Animation descriptor.

virtual async::Task copyVectors(const AnimationDataDescriptor &desc, TTimesContainer &times, TDataContainer<math::vec3> &data) const = 0

Retrieves vector frame data from the asset.

Parameters:
  • desc[in] Animation asset description.

  • times[out] A collection of extracted keyframes timesteps. Each element is a duration (in seconds) from the animation start until the moment when playback reaches the corresponding keyframe.

  • data[out] A collection of extracted vector per-keframe data.

Returns:

Task object providing operation status.

virtual async::Task copyRotations(const AnimationDataDescriptor &desc, TTimesContainer &times, TDataContainer<math::quat> &data) const = 0

Retrieves rotation frame data from the asset.

Parameters:
  • desc[in] Animation asset description.

  • times[out] A collection of extracted keyframes timesteps. Each element is a duration (in seconds) from the animation start until the moment when playback reaches the corresponding keyframe.

  • data[out] A collection of extracted rotation per-keframe data.

Returns:

Task object providing operation status.

virtual async::Task copyFramesData(const AnimationDataDescriptor &desc, DataBlock &data) const = 0

Retrieves additional frame data from the asset.

This function is used to extract frame events data from the asset.

Parameters:
  • desc[in] Animation asset description.

  • data[out] Data block to transfer the extracted data to.

Returns:

Task object providing operation status.

virtual nau::Ptr<struct ISkeletonAssetAccessor> getSkeletonAsset() const = 0

assets::AnimationAssetTag

engine/core/modules/assets/include/nau/assets/asset_ref.h

struct AnimationAssetTag

Temporary animation asset tags.