0022819: Redesign of OpenGl driver Additional integration
[occt.git] / src / OpenGl / OpenGl_Trihedron.hxx
1 // File:      OpenGl_Trihedron.hxx
2 // Created:   20 September 2011
3 // Author:    Sergey ZERCHANINOV
4 // Copyright: OPEN CASCADE 2011
5
6 #ifndef _OpenGl_Trihedron_Header
7 #define _OpenGl_Trihedron_Header
8
9 #include <Handle_OpenGl_Trihedron.hxx>
10
11 #include <Quantity_NameOfColor.hxx>
12 #include <Aspect_TypeOfTriedronPosition.hxx>
13
14 #include <OpenGl_AspectLine.hxx>
15 #include <OpenGl_AspectText.hxx>
16
17 class OpenGl_Trihedron : public MMgt_TShared
18 {
19  public:
20   OpenGl_Trihedron (const Aspect_TypeOfTriedronPosition APosition, const Quantity_NameOfColor AColor, const Standard_Real AScale, const Standard_Boolean AsWireframe);
21   virtual ~OpenGl_Trihedron ();
22
23   static void Setup (const Quantity_NameOfColor XColor, const Quantity_NameOfColor YColor, const Quantity_NameOfColor ZColor,
24                      const Standard_Real SizeRatio, const Standard_Real AxisDiametr, const Standard_Integer NbFacettes);
25
26   void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
27
28   // Type definition
29   //
30   DEFINE_STANDARD_RTTI(OpenGl_Trihedron)
31
32  protected:
33
34   void Redraw (const Handle(OpenGl_Workspace) &AWorkspace) const;
35   void RedrawZBuffer (const Handle(OpenGl_Workspace) &AWorkspace) const;
36
37   Aspect_TypeOfTriedronPosition myPos;
38   Standard_Real myScale;
39   Standard_Boolean myIsWireframe;
40   // Parameters for zbuffered mode
41   TEL_COLOUR myXColor;
42   TEL_COLOUR myYColor;
43   TEL_COLOUR myZColor;
44   float myRatio;
45   float myDiameter;
46   int   myNbFacettes;
47
48   OpenGl_AspectLine myAspectLine;
49   OpenGl_AspectText myAspectText;
50
51  public:
52   IMPLEMENT_MEMORY_OPERATORS
53 };
54
55 #endif //_OpenGl_Trihedron_Header