0025219: Visualization, TKOpenGl - disable code paths unavailable on OpenGL ES 2.0
[occt.git] / src / OpenGl / OpenGl_GraduatedTrihedron.hxx
1 // Created on: 2011-09-20
2 // Created by: Sergey ZERCHANINOV
3 // Copyright (c) 2011-2013 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _OpenGl_GraduatedTrihedron_Header
17 #define _OpenGl_GraduatedTrihedron_Header
18
19 #include <OpenGl_Element.hxx>
20
21 #include <OpenGl_Text.hxx>
22 #include <Graphic3d_CGraduatedTrihedron.hxx>
23
24 class Visual3d_View;
25 class OpenGl_View;
26
27 class OpenGl_GraduatedTrihedron : public OpenGl_Element
28 {
29
30 public:
31
32   static void SetMinMax (const Standard_ShortReal xMin, const Standard_ShortReal yMin, const Standard_ShortReal zMin,
33                          const Standard_ShortReal xMax, const Standard_ShortReal yMax, const Standard_ShortReal zMax);
34
35 public:
36
37   OpenGl_GraduatedTrihedron (const Graphic3d_CGraduatedTrihedron& theData);
38
39   virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
40   virtual void Release (OpenGl_Context* theCtx);
41
42 protected:
43
44   virtual ~OpenGl_GraduatedTrihedron();
45
46 protected:
47
48   mutable OpenGl_Text       myLabelX;
49   mutable OpenGl_Text       myLabelY;
50   mutable OpenGl_Text       myLabelZ;
51   mutable OpenGl_Text       myLabelValues;
52   mutable OpenGl_AspectText myAspectLabels;
53   mutable OpenGl_AspectText myAspectValues;
54   TEL_COLOUR myXNameColor;
55   TEL_COLOUR myYNameColor;
56   TEL_COLOUR myZNameColor;
57
58   bool myToDrawXName;
59   bool myToDrawYName;
60   bool myToDrawZName;
61   bool myToDrawXValues;
62   bool myToDrawYValues;
63   bool myToDrawZValues;
64   bool myToDrawGrid;
65   bool myToDrawAxes;
66   unsigned int myNbX, myNbY, myNbZ;
67   int myXOffset, myYOffset, myZOffset;
68   int myXAxisOffset, myYAxisOffset, myZAxisOffset;
69   Standard_Boolean myDrawXTickmarks;
70   Standard_Boolean myDrawYTickmarks;
71   Standard_Boolean myDrawZTickmarks;
72   unsigned int myXTickmarkLength, myYTickmarkLength, myZTickmarkLength;
73   float myGridColor[3];
74   TEL_COLOUR myXColor;
75   TEL_COLOUR myYColor;
76   TEL_COLOUR myZColor;
77   Graphic3d_CGraduatedTrihedron::minMaxValuesCallback myCbCubicAxes;
78   Visual3d_View* myPtrVisual3dView;
79
80 public:
81
82   DEFINE_STANDARD_ALLOC
83
84 };
85
86 #endif //_OpenGl_GraduatedTrihedron_Header