QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
src
3d
qgs3danimationsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgs3danimationsettings.h
3
--------------------------------------
4
Date : July 2018
5
Copyright : (C) 2018 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGS3DANIMATIONSETTINGS_H
17
#define QGS3DANIMATIONSETTINGS_H
18
19
#include "
qgsvector3d.h
"
20
#include "qgis_3d.h"
21
22
#include <QEasingCurve>
23
#include <QVector>
24
25
class
QDomDocument;
26
class
QDomElement;
27
class
QgsReadWriteContext
;
28
35
class
_3D_EXPORT
Qgs3DAnimationSettings
36
{
37
public
:
39
Qgs3DAnimationSettings
();
40
42
struct
Keyframe
43
{
44
float
time = 0;
45
QgsVector3D
point
;
46
float
dist = 0;
47
float
pitch = 0;
48
float
yaw = 0;
49
};
50
51
typedef
QVector<Keyframe>
Keyframes
;
52
54
void
setKeyframes
(
const
Keyframes &keyframes ) { mKeyframes = keyframes; }
56
Keyframes
keyFrames
()
const
{
return
mKeyframes; }
57
59
void
setEasingCurve
(
const
QEasingCurve &curve ) { mEasingCurve = curve; }
61
QEasingCurve
easingCurve
()
const
{
return
mEasingCurve; }
62
64
float
duration()
const
;
65
67
Keyframe
interpolate(
float
time )
const
;
68
70
void
readXml(
const
QDomElement &elem );
72
QDomElement writeXml( QDomDocument &doc )
const
;
73
74
private
:
75
Keyframes mKeyframes;
76
QEasingCurve mEasingCurve;
77
};
78
79
Q_DECLARE_METATYPE
(
Qgs3DAnimationSettings::Keyframe
)
80
81
#endif // QGS3DANIMATIONSETTINGS_H
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects...
Definition:
qgsreadwritecontext.h:34
QgsVector3D
3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double preci...
Definition:
qgsvector3d.h:31
Qgs3DAnimationSettings::Keyframe
keyframe definition
Definition:
qgs3danimationsettings.h:42
Qgs3DAnimationSettings::easingCurve
QEasingCurve easingCurve() const
Returns the interpolation method for transitions of the camera.
Definition:
qgs3danimationsettings.h:61
Qgs3DAnimationSettings::setKeyframes
void setKeyframes(const Keyframes &keyframes)
Configures keyframes of the animation. It is expected that the keyframes are ordered according to the...
Definition:
qgs3danimationsettings.h:54
Qgs3DAnimationSettings::keyFrames
Keyframes keyFrames() const
Returns keyframes of the animation.
Definition:
qgs3danimationsettings.h:56
Qgs3DAnimationSettings::Keyframes
QVector< Keyframe > Keyframes
Definition:
qgs3danimationsettings.h:51
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
Qgs3DAnimationSettings::Keyframe::point
QgsVector3D point
Point towards which the camera is looking in 3D world coords.
Definition:
qgs3danimationsettings.h:45
Qgs3DAnimationSettings
3 Class that holds information about animation in 3D view.
Definition:
qgs3danimationsettings.h:35
qgsvector3d.h
Qgs3DAnimationSettings::setEasingCurve
void setEasingCurve(const QEasingCurve &curve)
Sets the interpolation method for transitions of the camera.
Definition:
qgs3danimationsettings.h:59
Generated on Sun Oct 27 2019 00:43:28 for QGIS API Documentation by
1.8.13