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_Trihedron_Header
17 #define _OpenGl_Trihedron_Header
19 #include <OpenGl_Element.hxx>
21 #include <Aspect_TypeOfTriedronPosition.hxx>
22 #include <OpenGl_AspectLine.hxx>
23 #include <OpenGl_AspectText.hxx>
24 #include <OpenGl_Text.hxx>
25 #include <Quantity_NameOfColor.hxx>
27 class OpenGl_Trihedron : public OpenGl_Element
31 static void Setup (const Quantity_NameOfColor theXColor,
32 const Quantity_NameOfColor theYColor,
33 const Quantity_NameOfColor theZColor,
34 const Standard_Real theSizeRatio,
35 const Standard_Real theAxisDiametr,
36 const Standard_Integer theNbFacettes);
40 OpenGl_Trihedron (const Aspect_TypeOfTriedronPosition thePosition,
41 const Quantity_NameOfColor theColor,
42 const Standard_Real theScale,
43 const Standard_Boolean theAsWireframe);
45 virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
46 virtual void Release (OpenGl_Context* theCtx);
50 virtual ~OpenGl_Trihedron();
52 void redraw (const Handle(OpenGl_Workspace)& theWorkspace) const;
53 void redrawZBuffer (const Handle(OpenGl_Workspace)& theWorkspace) const;
57 Aspect_TypeOfTriedronPosition myPos;
58 Standard_Real myScale;
59 Standard_Boolean myIsWireframe;
60 // Parameters for zbuffered mode
68 OpenGl_AspectLine myAspectLine;
69 OpenGl_AspectText myAspectText;
70 mutable OpenGl_Text myLabelX;
71 mutable OpenGl_Text myLabelY;
72 mutable OpenGl_Text myLabelZ;
80 #endif //_OpenGl_Trihedron_Header