0024428: Implementation of LGPL license
[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
8 // under the terms of the GNU Lesser General Public 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 OpenGl_View;
25
26 class OpenGl_GraduatedTrihedron : public OpenGl_Element
27 {
28
29 public:
30
31   static void SetMinMax (const Standard_ShortReal xMin, const Standard_ShortReal yMin, const Standard_ShortReal zMin,
32                          const Standard_ShortReal xMax, const Standard_ShortReal yMax, const Standard_ShortReal zMax);
33
34 public:
35
36   OpenGl_GraduatedTrihedron (const Graphic3d_CGraduatedTrihedron& theData);
37
38   virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
39   virtual void Release (const Handle(OpenGl_Context)&   theCtx);
40
41 protected:
42
43   virtual ~OpenGl_GraduatedTrihedron();
44
45 protected:
46
47   mutable OpenGl_Text       myLabelX;
48   mutable OpenGl_Text       myLabelY;
49   mutable OpenGl_Text       myLabelZ;
50   mutable OpenGl_Text       myLabelValues;
51   mutable OpenGl_AspectText myAspectLabels;
52   mutable OpenGl_AspectText myAspectValues;
53   TEL_COLOUR myXNameColor;
54   TEL_COLOUR myYNameColor;
55   TEL_COLOUR myZNameColor;
56
57   bool myToDrawXName;
58   bool myToDrawYName;
59   bool myToDrawZName;
60   bool myToDrawXValues;
61   bool myToDrawYValues;
62   bool myToDrawZValues;
63   bool myToDrawGrid;
64   bool myToDrawAxes;
65   unsigned int myNbX, myNbY, myNbZ;
66   int myXOffset, myYOffset, myZOffset;
67   int myXAxisOffset, myYAxisOffset, myZAxisOffset;
68   Standard_Boolean myDrawXTickmarks;
69   Standard_Boolean myDrawYTickmarks;
70   Standard_Boolean myDrawZTickmarks;
71   unsigned int myXTickmarkLength, myYTickmarkLength, myZTickmarkLength;
72   float myGridColor[3];
73   TEL_COLOUR myXColor;
74   TEL_COLOUR myYColor;
75   TEL_COLOUR myZColor;
76   minMaxValuesCallback myCbCubicAxes;
77   void* myPtrVisual3dView;
78
79 public:
80
81   DEFINE_STANDARD_ALLOC
82
83 };
84
85 #endif //_OpenGl_GraduatedTrihedron_Header