QGIS API Documentation
3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
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 "qgis_3d.h"
20
#include "
qgsvector3d.h
"
21
22
#include <QEasingCurve>
23
#include <QVector>
24
25
#define SIP_NO_FILE
26
27
class
QDomDocument;
28
class
QDomElement;
29
class
QgsReadWriteContext
;
30
31
40
class
_3D_EXPORT
Qgs3DAnimationSettings
41
{
42
public
:
43
Qgs3DAnimationSettings
();
44
46
struct
Keyframe
47
{
48
float
time
= 0;
49
QgsVector3D
point
;
50
float
dist
= 0;
51
float
pitch
= 0;
52
float
yaw
= 0;
53
};
54
55
typedef
QVector<Keyframe>
Keyframes
;
56
58
void
setKeyframes
(
const
Keyframes
&keyframes ) { mKeyframes = keyframes; }
60
Keyframes
keyFrames
()
const
{
return
mKeyframes; }
61
63
void
setEasingCurve
(
const
QEasingCurve &curve ) { mEasingCurve = curve; }
65
QEasingCurve
easingCurve
()
const
{
return
mEasingCurve; }
66
68
float
duration()
const
;
69
71
Keyframe interpolate(
float
time )
const
;
72
74
void
readXml(
const
QDomElement &elem );
76
QDomElement writeXml( QDomDocument &doc )
const
;
77
78
private
:
79
Keyframes mKeyframes;
80
QEasingCurve mEasingCurve;
81
};
82
83
Q_DECLARE_METATYPE
(
Qgs3DAnimationSettings::Keyframe
)
84
85
#endif
// QGS3DANIMATIONSETTINGS_H
Qgs3DAnimationSettings::setEasingCurve
void setEasingCurve(const QEasingCurve &curve)
Sets the interpolation method for transitions of the camera.
Definition
qgs3danimationsettings.h:63
Qgs3DAnimationSettings::easingCurve
QEasingCurve easingCurve() const
Returns the interpolation method for transitions of the camera.
Definition
qgs3danimationsettings.h:65
Qgs3DAnimationSettings::Qgs3DAnimationSettings
Qgs3DAnimationSettings()
Qgs3DAnimationSettings::keyFrames
Keyframes keyFrames() const
Returns keyframes of the animation.
Definition
qgs3danimationsettings.h:60
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:58
Qgs3DAnimationSettings::Keyframes
QVector< Keyframe > Keyframes
Definition
qgs3danimationsettings.h:55
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
QgsVector3D
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition
qgsvector3d.h:33
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
qgsvector3d.h
Qgs3DAnimationSettings::Keyframe
keyframe definition
Definition
qgs3danimationsettings.h:47
Qgs3DAnimationSettings::Keyframe::pitch
float pitch
Tilt of the camera in degrees (0 = looking from the top, 90 = looking from the side,...
Definition
qgs3danimationsettings.h:51
Qgs3DAnimationSettings::Keyframe::yaw
float yaw
Horizontal rotation around the focal point in degrees.
Definition
qgs3danimationsettings.h:52
Qgs3DAnimationSettings::Keyframe::point
QgsVector3D point
Point towards which the camera is looking in 3D map coords.
Definition
qgs3danimationsettings.h:49
Qgs3DAnimationSettings::Keyframe::time
float time
Relative time of the keyframe in seconds.
Definition
qgs3danimationsettings.h:48
Qgs3DAnimationSettings::Keyframe::dist
float dist
Distance of the camera from the focal point.
Definition
qgs3danimationsettings.h:50
Generated on
for QGIS API Documentation by
1.15.0