1 // Created on: 2011-09-20
2 // Created by: Sergey ZERCHANINOV
3 // Copyright (c) 2011-2013 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _OpenGl_GraduatedTrihedron_Header
17 #define _OpenGl_GraduatedTrihedron_Header
19 #include <OpenGl_Element.hxx>
21 #include <OpenGl_Text.hxx>
22 #include <Graphic3d_CGraduatedTrihedron.hxx>
27 class OpenGl_GraduatedTrihedron : public OpenGl_Element
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);
37 OpenGl_GraduatedTrihedron (const Graphic3d_CGraduatedTrihedron& theData);
39 virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
40 virtual void Release (OpenGl_Context* theCtx);
44 virtual ~OpenGl_GraduatedTrihedron();
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;
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;
77 Graphic3d_CGraduatedTrihedron::minMaxValuesCallback myCbCubicAxes;
78 Visual3d_View* myPtrVisual3dView;
86 #endif //_OpenGl_GraduatedTrihedron_Header