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/HLAObjectInstance.hxx>
24 #include "HLAObjectReferenceData.hxx"
25 #include "HLASceneObject.hxx"
31 class HLAView : public simgear::HLAObjectInstance {
33 HLAView(HLAViewClass* objectClass, const SGWeakPtr<simgear::HLAFederate>& federate);
36 virtual void createAttributeDataElements();
38 virtual void discoverInstance(const simgear::RTIData& tag);
39 virtual void removeInstance(const simgear::RTIData& tag);
41 virtual void registerInstance(simgear::HLAObjectClass* objectClass);
42 virtual void deleteInstance(const simgear::RTIData& tag);
44 const std::string& getNameAttribute() const
45 { return _name.getValue(); }
46 void setNameAttribute(const std::string& name)
47 { _name.setValue(name); }
49 const SGVec3d& getPosition() const
50 { return _position.getValue(); }
51 void setPosition(const SGVec3d& position)
52 { _position.setValue(position); }
54 const SGQuatd& getOrientation() const
55 { return _orientation.getValue(); }
56 void setOrientation(const SGQuatd& orientation)
57 { _orientation.setValue(orientation); }
59 const HLASceneObject* getSceneObject() const;
60 HLASceneObject* getSceneObject();
61 void setSceneObject(HLASceneObject* sceneObject);
63 virtual SGLocationd getLocation(const SGTimeStamp& simTime) const;
66 simgear::HLAStringData _name;
68 simgear::HLAVec3dData _position;
69 simgear::HLAQuat3dData _orientation;
71 simgear::HLAObjectReferenceData<HLASceneObject> _sceneObject;
74 } // namespace fgviewer