Pencil2D
ff90c0872e88be3bf81c548cd60f01983012ec49
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
Main Page
Classes
Files
File List
All
Classes
Functions
core_lib
structure
camera.h
1
/*
2
3
Pencil - Traditional Animation Software
4
Copyright (C) 2012-2017 Matthew Chiawen Chang
5
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License
8
as published by the Free Software Foundation; version 2 of the License.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
*/
16
17
#ifndef CAMERA_H
18
#define CAMERA_H
19
20
#include <QTransform>
21
#include "keyframe.h"
22
23
24
class
Camera
:
public
KeyFrame
25
{
26
public
:
27
Camera
();
28
Camera
(QPointF translation,
float
rotation,
float
scaling);
29
~
Camera
();
30
31
void
setViewTransform(QPointF translation,
float
rotation,
float
scaling);
32
33
QPointF translation() {
return
mTranslate; }
34
float
rotation() {
return
mRotate; }
35
float
scaling() {
return
mScale; }
36
37
QTransform view;
38
39
private
:
40
void
updateViewTransform();
41
42
QPointF mTranslate;
43
float
mRotate = 0.f;
44
float
mScale = 1.f;
45
};
46
47
#endif // CAMERA_H
Camera
Definition:
camera.h:24
KeyFrame
Definition:
keyframe.h:29
Generated on Fri Sep 1 2017 16:48:40 for Pencil2D by
1.8.6