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.
21 #include <simgear/hla/HLAArrayDataElement.hxx>
22 #include <simgear/hla/HLAObjectClass.hxx>
28 class HLACamera : public simgear::HLAObjectInstance {
30 HLACamera(HLACameraClass* objectClass = 0);
33 virtual void createAttributeDataElements();
35 const std::string& getName() const
36 { return _name.getValue(); }
37 void setName(const std::string& name)
38 { _name.setValue(name); }
40 const std::string& getViewer() const
41 { return _viewer.getValue(); }
42 void setViewer(const std::string& viewer)
43 { _viewer.setValue(viewer); }
45 const std::string& getDrawable() const
46 { return _drawable.getValue(); }
47 void setDrawable(const std::string& drawable)
48 { _drawable.setValue(drawable); }
50 const SGVec4i& getViewport() const
51 { return _viewport.getValue(); }
52 void setViewport(const SGVec4i& viewport)
53 { _viewport.setValue(viewport); }
55 const SGVec3d& getPosition() const
56 { return _position.getValue(); }
57 void setPosition(const SGVec3d& position)
58 { _position.setValue(position); }
60 const SGQuatd& getOrientation() const
61 { return _orientation.getValue(); }
62 void setOrientation(const SGQuatd& orientation)
63 { _orientation.setValue(orientation); }
65 SGLocationd getLocation() const
66 { return SGLocationd(getPosition(), getOrientation()); }
67 void setLocation(const SGLocationd& location)
68 { setPosition(location.getPosition()); setOrientation(location.getOrientation()); }
71 simgear::HLAStringData _name;
72 simgear::HLAStringData _viewer;
73 simgear::HLAStringData _drawable;
74 simgear::HLAVec4iData _viewport;
75 simgear::HLAVec3dData _position;
76 simgear::HLAQuat3dData _orientation;
79 } // namespace fgviewer