AnimationNodeConfig

class rlogic::AnimationNodeConfig

Holds data and settings for rlogic::AnimationNode creation using rlogic::LogicEngine::createAnimationNode.

Public Functions

bool addChannel(const AnimationChannel &channelData)

Adds a data to animate. rlogic::AnimationNode can use multiple animation channels to animate, see rlogic::AnimationNode and rlogic::AnimationChannel for details. This call can fail, see rlogic::AnimationChannel for rules that channel data must follow.

Return

true if the channel was added successfully, false otherwise. In case of an error, check the logs.

Parameters
  • channelData: channel data to add to configuration

const AnimationChannels &getChannels() const

Returns all channels data added to this AnimationNodeConfig so far.

Return

animation channels in this AnimationNodeConfig.

bool setExposingOfChannelDataAsProperties(bool enabled)

If enabled, the created rlogic::AnimationNode will expose its basic channel data (timestamps and keyframes) in form of logic node properties. These properties can be set and linked allowing for control over actual animation data to be animated. The data can be adjusted at any point in time, also during playing the animation.

This functionality comes at a price - there is performance overhead and strict limit of how many keyframes the animation can have. All timestamp/keyframe values are represented as child properties within an array, per channel, refer to rlogic::AnimationNode for the exact structure of these inputs. Processing the animation data in this form is not cheap compared to a regular animation node and there is a limit of 255 timestamps/keyframes any channel can have. Always try to minimize the amount of animation data when using this type of animation node.

Note that all modifications to the animation data are considered temporary and will NOT be preserved when saving to a file. All values and corresponding properties will be reset to original values (provided in this AnimationNodeConfig from when the rlogic::AnimationNode was created) when loading from a file.

By default this feature is disabled. This feature cannot be enabled (this call will fail) if the AnimationNodeConfig contains a channel with rlogic::DataArray using data type rlogic::EPropertyType::Array.

Return

true if enabled successfully, false otherwise. In case of an error, check the logs.

Parameters
  • enabled: flag to enable or disable exposing of channels data as properties.

bool getExposingOfChannelDataAsProperties() const

Returns the currently set state of the exposing of channel data as properties.

Return

the currently set state of the exposing of channel data as properties.

~AnimationNodeConfig() noexcept

Destructor of AnimationNodeConfig

AnimationNodeConfig(const AnimationNodeConfig &other)

Copy Constructor of AnimationNodeConfig

Parameters
  • other: the other AnimationNodeConfig to copy from

AnimationNodeConfig(AnimationNodeConfig &&other) noexcept

Move Constructor of AnimationNodeConfig

Parameters
  • other: the other AnimationNodeConfig to move from

AnimationNodeConfig &operator=(const AnimationNodeConfig &other)

Assignment operator of AnimationNodeConfig

Return

self

Parameters
  • other: the other AnimationNodeConfig to copy from

AnimationNodeConfig &operator=(AnimationNodeConfig &&other) noexcept

Move assignment operator of AnimationNodeConfig

Return

self

Parameters
  • other: the other AnimationNodeConfig to move from

Public Members

std::unique_ptr<internal::AnimationNodeConfigImpl> m_impl

Implementation detail of AnimationNodeConfig