1 // placement.hxx - manage the placment of a 3D model.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain, and comes with no warranty.
7 #ifndef _SG_PLACEMENT_HXX
8 #define _SG_PLACEMENT_HXX 1
11 # error This library requires C++
17 #include <simgear/math/point3d.hxx>
18 #include <simgear/props/props.hxx>
21 // Don't pull in the headers, since we don't need them here.
23 class ssgPlacementTransform;
26 // Has anyone done anything *really* stupid, like making min and max macros?
35 ////////////////////////////////////////////////////////////////////////
37 ////////////////////////////////////////////////////////////////////////
40 * A wrapper for a model with a definite placement.
42 class SGModelPlacement
47 virtual ~SGModelPlacement ();
49 virtual void init( ssgBranch * model );
51 virtual void update();
53 virtual ssgEntity * getSceneGraph () { return (ssgEntity *)_selector; }
55 virtual SGLocation * getSGLocation () { return _location; }
57 virtual bool getVisible () const;
58 virtual void setVisible (bool visible);
60 virtual double getLongitudeDeg () const { return _lon_deg; }
61 virtual double getLatitudeDeg () const { return _lat_deg; }
62 virtual double getElevationFt () const { return _elev_ft; }
64 virtual void setLongitudeDeg (double lon_deg);
65 virtual void setLatitudeDeg (double lat_deg);
66 virtual void setElevationFt (double elev_ft);
67 virtual void setPosition (double lon_deg, double lat_deg, double elev_ft);
69 virtual double getRollDeg () const { return _roll_deg; }
70 virtual double getPitchDeg () const { return _pitch_deg; }
71 virtual double getHeadingDeg () const { return _heading_deg; }
73 virtual void setRollDeg (double roll_deg);
74 virtual void setPitchDeg (double pitch_deg);
75 virtual void setHeadingDeg (double heading_deg);
76 virtual void setOrientation (double roll_deg, double pitch_deg,
79 ssgPlacementTransform * getTransform(void)
94 ssgSelector * _selector;
95 ssgPlacementTransform * _position;
98 SGLocation * _location;
101 #endif // _SG_PLACEMENT_HXX