mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-10 14:07:23 +02:00
38 lines
No EOL
1.1 KiB
C++
38 lines
No EOL
1.1 KiB
C++
//
|
|
// ScriptableAvatar.h
|
|
//
|
|
//
|
|
// Created by Clement on 7/22/14.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_ScriptableAvatar_h
|
|
#define hifi_ScriptableAvatar_h
|
|
|
|
#include <AnimationCache.h>
|
|
#include <AvatarData.h>
|
|
#include <ScriptEngine.h>
|
|
|
|
class ScriptableAvatar : public AvatarData, public Dependency{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
/// Allows scripts to run animations.
|
|
Q_INVOKABLE void startAnimation(const QString& url, float fps = 30.0f, float priority = 1.0f, bool loop = false,
|
|
bool hold = false, float firstFrame = 0.0f, float lastFrame = FLT_MAX, const QStringList& maskedJoints = QStringList());
|
|
Q_INVOKABLE void stopAnimation();
|
|
Q_INVOKABLE AnimationDetails getAnimationDetails();
|
|
|
|
private slots:
|
|
void update(float deltatime);
|
|
|
|
private:
|
|
AnimationPointer _animation;
|
|
AnimationDetails _animationDetails;
|
|
QStringList _maskedJoints;
|
|
};
|
|
|
|
#endif // hifi_ScriptableAvatar_h
|