6 // PanelNode defines an SSG leaf object that draws a FGPanel object
7 // into the scene graph. Note that this is an incomplete SSG object,
8 // many methods, mostly involved with modelling and runtime
9 // inspection, are unimplemented.
11 class FGPanelNode : public ssgLeaf
14 virtual void draw_geometry();
17 FGPanelNode(SGPropertyNode* props);
18 virtual ~FGPanelNode();
21 void mouseEvent(int button, int updown, int x, int y);
23 virtual void recalcBSphere() { bsphere_is_invalid = 0; }
26 // A bunch of Plib functions that aren't implemented. I don't
27 // even know what many of them do, but they're pure virtual and
28 // require implementation.
30 virtual int getNumTriangles() { die(); return 0; }
31 virtual void getTriangle(int n, short* v1, short* v2, short* v3) { die(); }
32 virtual int getNumLines() { die(); return 0; }
33 virtual void getLine(int n, short* v1, short* v2) { die(); }
35 virtual void drawHighlight(sgVec4 colour) { die(); }
36 virtual void drawHighlight(sgVec4 colour, int i) { die(); }
37 virtual float* getVertex(int i) { die(); return 0; }
38 virtual float* getNormal(int i) { die(); return 0; }
39 virtual float* getColour(int i) { die(); return 0; }
40 virtual float* getTexCoord(int i) { die(); return 0; }
41 virtual void pick(int baseName) { die(); }
42 virtual void isect_triangles(sgSphere* s, sgMat4 m, int testNeeded) { die(); }
43 virtual void hot_triangles(sgVec3 s, sgMat4 m, int testNeeded) { die(); }
44 virtual void los_triangles(sgVec3 s, sgMat4 m, int testNeeded) { die(); }
45 virtual void transform(const sgMat4 m) { die(); }
48 // Handler for all the unimplemented methods above
53 // Panel corner coordinates
54 float _bottomLeft[3], _topLeft[3], _bottomRight[3];
56 // The input range expected in the panel definition. These x/y
57 // coordinates will map to the right/top sides.
60 // The matrix that results, which transforms 2D x/y panel
61 // coordinates into 3D coordinates of the panel quadrilateral.
64 // The matrix transformation state that was active the last time
65 // we were rendered. Used by the mouse code to compute
67 GLfloat _lastModelview[16];
68 GLfloat _lastProjection[16];
69 GLint _lastViewport[4];