| 1 | // Copyright (C) 2009 - 2012 Mathias Froehlich - [email protected] |
| 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 HLAPerspectiveCameraClass_hxx |
| 19 | #define HLAPerspectiveCameraClass_hxx |
| 20 | |
| 21 | #include "HLACameraClass.hxx" |
| 22 | |
| 23 | namespace fgviewer { |
| 24 | |
| 25 | class HLAPerspectiveCameraClass : public HLACameraClass { |
| 26 | public: |
| 27 | HLAPerspectiveCameraClass(const std::string& name, simgear::HLAFederate* federate); |
| 28 | virtual ~HLAPerspectiveCameraClass(); |
| 29 | |
| 30 | /// Create a new instance of this class. |
| 31 | virtual simgear::HLAObjectInstance* createObjectInstance(const std::string& name); |
| 32 | |
| 33 | virtual void createAttributeDataElements(simgear::HLAObjectInstance& objectInstance); |
| 34 | |
| 35 | bool setLeftIndex(const std::string& path) |
| 36 | { return getDataElementIndex(_leftIndex, path); } |
| 37 | const simgear::HLADataElementIndex& getLeftIndex() const |
| 38 | { return _leftIndex; } |
| 39 | |
| 40 | bool setRightIndex(const std::string& path) |
| 41 | { return getDataElementIndex(_rightIndex, path); } |
| 42 | const simgear::HLADataElementIndex& getRightIndex() const |
| 43 | { return _rightIndex; } |
| 44 | |
| 45 | bool setBottomIndex(const std::string& path) |
| 46 | { return getDataElementIndex(_bottomIndex, path); } |
| 47 | const simgear::HLADataElementIndex& getBottomIndex() const |
| 48 | { return _bottomIndex; } |
| 49 | |
| 50 | bool setTopIndex(const std::string& path) |
| 51 | { return getDataElementIndex(_topIndex, path); } |
| 52 | const simgear::HLADataElementIndex& getTopIndex() const |
| 53 | { return _topIndex; } |
| 54 | |
| 55 | bool setDistanceIndex(const std::string& path) |
| 56 | { return getDataElementIndex(_distanceIndex, path); } |
| 57 | const simgear::HLADataElementIndex& getDistanceIndex() const |
| 58 | { return _distanceIndex; } |
| 59 | |
| 60 | private: |
| 61 | simgear::HLADataElementIndex _leftIndex; |
| 62 | simgear::HLADataElementIndex _rightIndex; |
| 63 | simgear::HLADataElementIndex _bottomIndex; |
| 64 | simgear::HLADataElementIndex _topIndex; |
| 65 | simgear::HLADataElementIndex _distanceIndex; |
| 66 | }; |
| 67 | |
| 68 | } // namespace fgviewer |
| 69 | |
| 70 | #endif |