Skip to content

Kuesa::Qt3D::AnimationPulse

Module: Kuesa Qt 3D API

Given a pulse animation, emits signals when the pulse goes up or down. More...

#include <Kuesa/Qt3D/api/animationpulse.h>

Inherits from Kuesa::Qt3D::AnimationPlayer, Kuesa::Qt3D::KuesaNode, Qt3DCore::QNode

Inherited by Kuesa::Qt3D::SteppedAnimationPlayer

Public Signals

Name
void up()
void down()
void pulseChanged(float pulse)

Public Functions

Name
AnimationPulse(Qt3DCore::QNode * parent =nullptr)
float pulse() const

Public Properties

Name
float pulse

Additional inherited members

Public Types inherited from Kuesa::Qt3D::AnimationPlayer

Name
enum Loops { Infinite}

Public Slots inherited from Kuesa::Qt3D::AnimationPlayer

Name
void setClip(const QString & clip)
void setMapper(const QString & mapper)
void setRunning(bool running)
void setLoopCount(int loops)
void setClock(Qt3DAnimation::QClock * clock)
void setNormalizedTime(float timeFraction)
void start(int delay =0)
void stop()
void reset()
void restart(int delay =0)
void run(float fromTimeFraction, float toTimeFraction)

Public Signals inherited from Kuesa::Qt3D::AnimationPlayer

Name
void statusChanged(Kuesa::Qt3D::AnimationPlayer::Status status)
void clipChanged(const QString & clip)
void mapperChanged(const QString & mapper)
void runningChanged(bool running)
void loopCountChanged(int loops)
void clockChanged(Qt3DAnimation::QClock * clock)
void normalizedTimeChanged(float index)
void durationChanged(float duration)
void currentLoopChanged(int currentLoop)

Public Functions inherited from Kuesa::Qt3D::AnimationPlayer

Name
Q_ENUM(Loops )
Q_ENUM(Status) explicit AnimationPlayer(Qt3DCore ~AnimationPlayer()
Status status() const
QString clip() const
QString mapper() const
bool isRunning() const
int loopCount() const
int currentLoop() const
Qt3DAnimation::QClock * clock() const
float normalizedTime() const
float duration() const
QVector< Qt3DCore::QNode * > targets() const
AnimationPlayer::targets returns the list of currently defined targets for animations.
void addTarget(Qt3DCore::QNode * target)
AnimationPlayer::addTarget adds a node target as a target for the animation.
void removeTarget(Qt3DCore::QNode * target)

Public Properties inherited from Kuesa::Qt3D::AnimationPlayer

Name
Status status
the current status of the player
QString clip
the name of the clip asset.
QString mapper
the name of the mapper asset.
bool running
controls if the animation is running or not
int loops
controls the number of time the animation should repeat.
int currentLoop
Qt3DAnimation::QClock * clock
instance of Qt3DAnimation::QClock used to control animation speed and direction
float normalizedTime
progress of the animation as a uniform value between 0. and 1.
float duration
duration of the animation in secconds

Public Slots inherited from Kuesa::Qt3D::KuesaNode

Name
void setSceneEntity(Kuesa::Qt3D::SceneEntity * sceneEntity)

Public Signals inherited from Kuesa::Qt3D::KuesaNode

Name
void sceneEntityChanged(Kuesa::Qt3D::SceneEntity * sceneEntity)

Public Functions inherited from Kuesa::Qt3D::KuesaNode

Name
KuesaNode(Qt3DCore::QNode * parent =nullptr)
SceneEntity * sceneEntity() const

Public Properties inherited from Kuesa::Qt3D::KuesaNode

Name
Kuesa::Qt3D::SceneEntity * sceneEntity

Protected Attributes inherited from Kuesa::Qt3D::KuesaNode

Name
SceneEntity * m_sceneEntity

Detailed Description

1
class Kuesa::Qt3D::AnimationPulse;

Given a pulse animation, emits signals when the pulse goes up or down.

Since: Kuesa 2.0

Note: To support AnimationPulse without any glTF extension, the animation should animate the translation property of a glTF.Node. In particular, the pulse fcurve should animate the "y" property of the translation.

AnimationPulse is an utility class designed to let the designer encode certain events directly on the 3D design tool. Given an animation, it emits an up signal when qRound(animatedValue) increases and a down signal when qRound(animatedValue) decreases.

In combination with a STEP pulse animation, a designer can encode the moment in which certain actions should happen, for example, pausing an animation, directly from the 3D design tool.

Public Signals Documentation

signal up

1
void up()

signal down

1
void down()

signal pulseChanged

1
2
3
void pulseChanged(
    float pulse
)

Public Functions Documentation

function AnimationPulse

1
2
3
explicit AnimationPulse(
    Qt3DCore::QNode * parent =nullptr
)

function pulse

1
float pulse() const

Public Property Documentation

property pulse

1
float pulse;

Updated on 2023-07-03 at 11:02:11 +0000