1 #ifndef FG_PANELNODE_HXX
2 #define FG_PANELNODE_HXX
6 #include <osg/Drawable>
11 // PanelNode defines an SSG leaf object that draws a FGPanel object
12 // into the scene graph. Note that this is an incomplete SSG object,
13 // many methods, mostly involved with modelling and runtime
14 // inspection, are unimplemented.
16 // Static mouse handler for all FGPanelNodes. Very clumsy; this
17 // should really be done through our container (an aircraft model,
19 bool fgHandle3DPanelMouseEvent(int button, int updown, int x, int y);
20 void fgUpdate3DPanels();
22 class FGPanelNode : public osg::Drawable // OSGFIXME
25 FGPanelNode(SGPropertyNode* props);
26 virtual ~FGPanelNode();
29 virtual osg::Object* cloneType() const { return 0; }
30 virtual osg::Object* clone(const osg::CopyOp& copyop) const { return 0; }
32 bool doMouseAction(int button, int updown, int x, int y);
34 FGPanel* getPanel() { return _panel; }
36 virtual void drawImplementation(osg::State& state) const;
37 virtual osg::BoundingBox computeBound() const;
42 // Panel corner coordinates
43 osg::Vec3 _bottomLeft, _topLeft, _bottomRight;
45 // The input range expected in the panel definition. These x/y
46 // coordinates will map to the right/top sides.
49 // The matrix that results, which transforms 2D x/y panel
50 // coordinates into 3D coordinates of the panel quadrilateral.
53 // The matrix transformation state that was active the last time
54 // we were rendered. Used by the mouse code to compute
56 osg::Matrix _lastModelview;
57 osg::Matrix _lastProjection;
62 #endif // FG_PANELNODE_HXX