]> git.mxchange.org Git - flightgear.git/blob - utils/fgviewer/HLAPerspectiveCamera.hxx
commradio: improvements for atis speech
[flightgear.git] / utils / fgviewer / HLAPerspectiveCamera.hxx
1 // Copyright (C) 2009 - 2012  Mathias Froehlich - Mathias.Froehlich@web.de
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Library General Public
5 // License as published by the Free Software Foundation; either
6 // version 2 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Library General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16 //
17
18 #ifndef HLAPerspectiveCamera_hxx
19 #define HLAPerspectiveCamera_hxx
20
21 #include <simgear/hla/HLABasicDataElement.hxx>
22 #include "Frustum.hxx"
23 #include "HLACamera.hxx"
24
25 namespace fgviewer {
26
27 class HLAPerspectiveCameraClass;
28
29 class HLAPerspectiveCamera : public HLACamera {
30 public:
31     HLAPerspectiveCamera(HLAPerspectiveCameraClass* objectClass);
32     virtual ~HLAPerspectiveCamera();
33
34     virtual void reflectAttributeValues(const simgear::HLAIndexList& indexList, const simgear::RTIData& tag);
35     virtual void reflectAttributeValues(const simgear::HLAIndexList& indexList, const SGTimeStamp& timeStamp, const simgear::RTIData& tag);
36
37     virtual void createAttributeDataElements();
38
39     double getLeft() const
40     { return _left.getValue(); }
41     void setLeft(double left)
42     { _left.setValue(left); }
43
44     double getRight() const
45     { return _right.getValue(); }
46     void setRight(double right)
47     { _right.setValue(right); }
48
49     double getBottom() const
50     { return _bottom.getValue(); }
51     void setBottom(double bottom)
52     { _bottom.setValue(bottom); }
53
54     double getTop() const
55     { return _top.getValue(); }
56     void setTop(double top)
57     { _top.setValue(top); }
58
59     double getDistance() const
60     { return _distance.getValue(); }
61     void setDistance(double distance)
62     { _distance.setValue(distance); }
63
64     Frustum getFrustum() const;
65     void setFrustum(const Frustum& frustum);
66
67 private:
68     simgear::HLADoubleData _left;
69     simgear::HLADoubleData _right;
70     simgear::HLADoubleData _bottom;
71     simgear::HLADoubleData _top;
72     simgear::HLADoubleData _distance;
73 };
74
75 } // namespace fgviewer
76
77 #endif