0024001: Stereographic rendering support
[occt.git] / src / OpenGl / OpenGl_Trihedron.hxx
CommitLineData
b311480e 1// Created on: 2011-09-20
2// Created by: Sergey ZERCHANINOV
a174a3c5 3// Copyright (c) 2011-2013 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
2166f0fa
SK
16#ifndef _OpenGl_Trihedron_Header
17#define _OpenGl_Trihedron_Header
18
a174a3c5 19#include <OpenGl_Element.hxx>
2166f0fa 20
2166f0fa 21#include <Aspect_TypeOfTriedronPosition.hxx>
2166f0fa
SK
22#include <OpenGl_AspectLine.hxx>
23#include <OpenGl_AspectText.hxx>
a174a3c5 24#include <OpenGl_Text.hxx>
25#include <Quantity_NameOfColor.hxx>
2166f0fa 26
a174a3c5 27class OpenGl_Trihedron : public OpenGl_Element
2166f0fa 28{
a174a3c5 29public:
30
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);
2166f0fa 37
a174a3c5 38public:
2166f0fa 39
a174a3c5 40 OpenGl_Trihedron (const Aspect_TypeOfTriedronPosition thePosition,
41 const Quantity_NameOfColor theColor,
42 const Standard_Real theScale,
43 const Standard_Boolean theAsWireframe);
2166f0fa 44
a174a3c5 45 virtual void Render (const Handle(OpenGl_Workspace)& theWorkspace) const;
46 virtual void Release (const Handle(OpenGl_Context)& theCtx);
2166f0fa 47
a174a3c5 48protected:
2166f0fa 49
a174a3c5 50 virtual ~OpenGl_Trihedron();
51
52 void redraw (const Handle(OpenGl_Workspace)& theWorkspace) const;
53 void redrawZBuffer (const Handle(OpenGl_Workspace)& theWorkspace) const;
54
55protected:
2166f0fa
SK
56
57 Aspect_TypeOfTriedronPosition myPos;
58 Standard_Real myScale;
59 Standard_Boolean myIsWireframe;
60 // Parameters for zbuffered mode
61 TEL_COLOUR myXColor;
62 TEL_COLOUR myYColor;
63 TEL_COLOUR myZColor;
64 float myRatio;
65 float myDiameter;
66 int myNbFacettes;
67
a174a3c5 68 OpenGl_AspectLine myAspectLine;
69 OpenGl_AspectText myAspectText;
70 mutable OpenGl_Text myLabelX;
71 mutable OpenGl_Text myLabelY;
72 mutable OpenGl_Text myLabelZ;
73
74public:
2166f0fa 75
1c35b92f 76 DEFINE_STANDARD_ALLOC
a174a3c5 77
2166f0fa
SK
78};
79
80#endif //_OpenGl_Trihedron_Header