1 // Copyright (C) 2009 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de
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.
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.
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.
18 #ifndef HLAPerspectiveCamera_hxx
19 #define HLAPerspectiveCamera_hxx
21 #include <simgear/hla/HLABasicDataElement.hxx>
22 #include "Frustum.hxx"
23 #include "HLACamera.hxx"
27 class HLAPerspectiveCameraClass;
29 class HLAPerspectiveCamera : public HLACamera {
31 HLAPerspectiveCamera(HLAPerspectiveCameraClass* objectClass);
32 virtual ~HLAPerspectiveCamera();
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);
37 virtual void createAttributeDataElements();
39 double getLeft() const
40 { return _left.getValue(); }
41 void setLeft(double left)
42 { _left.setValue(left); }
44 double getRight() const
45 { return _right.getValue(); }
46 void setRight(double right)
47 { _right.setValue(right); }
49 double getBottom() const
50 { return _bottom.getValue(); }
51 void setBottom(double bottom)
52 { _bottom.setValue(bottom); }
55 { return _top.getValue(); }
56 void setTop(double top)
57 { _top.setValue(top); }
59 double getDistance() const
60 { return _distance.getValue(); }
61 void setDistance(double distance)
62 { _distance.setValue(distance); }
64 Frustum getFrustum() const;
65 void setFrustum(const Frustum& frustum);
68 simgear::HLADoubleData _left;
69 simgear::HLADoubleData _right;
70 simgear::HLADoubleData _bottom;
71 simgear::HLADoubleData _top;
72 simgear::HLADoubleData _distance;
75 } // namespace fgviewer