]> git.treefish.org Git - seamulator.git/blob - include/seaview.h
Added gpl license
[seamulator.git] / include / seaview.h
1 /**
2  * Copyright (C) 2016  Alexander Schmidt
3  *
4  * This file is part of Seamulator.
5  *
6  * Seamulator is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Seamulator is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #pragma once
21
22 class SeaView
23 {
24  public:
25   SeaView(double distance, double azimuth, double altitude);
26   void onMouseEvent(int button, int state, int x, int y);
27   void onMouseMove(int x, int y);
28   void setupView() const;
29
30  private:
31   static constexpr double DISTANCE_MULTIPLIER = 0.1f;
32
33   double m_distance;
34   double m_azimuth;
35   double m_altitude;
36   int m_mouseDownPos[2];
37   double m_mouseDownAltitude;
38   double m_mouseDownAzimuth;
39 };