0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing
[occt.git] / src / V3d / V3d_CircularGrid.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-07-16
2// Created by: CAL
3// Copyright (c) 1998-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _V3d_CircularGrid_HeaderFile
18#define _V3d_CircularGrid_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <gp_Ax3.hxx>
24#include <V3d_ViewerPointer.hxx>
25#include <Standard_Boolean.hxx>
26#include <Aspect_GridDrawMode.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Integer.hxx>
29#include <Aspect_CircularGrid.hxx>
30class Graphic3d_Structure;
31class Graphic3d_Group;
42cf5bc1 32
33class V3d_CircularGrid : public Aspect_CircularGrid
34{
475c2302 35 DEFINE_STANDARD_RTTIEXT(V3d_CircularGrid, Aspect_CircularGrid)
42cf5bc1 36public:
37
42cf5bc1 38 Standard_EXPORT V3d_CircularGrid(const V3d_ViewerPointer& aViewer, const Quantity_Color& aColor, const Quantity_Color& aTenthColor);
475c2302 39
40 Standard_EXPORT virtual ~V3d_CircularGrid();
41
42cf5bc1 42 Standard_EXPORT void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor) Standard_OVERRIDE;
43
44 Standard_EXPORT void Display() Standard_OVERRIDE;
45
46 Standard_EXPORT void Erase() const Standard_OVERRIDE;
47
48 Standard_EXPORT Standard_Boolean IsDisplayed() const Standard_OVERRIDE;
49
50 Standard_EXPORT void GraphicValues (Standard_Real& Radius, Standard_Real& OffSet) const;
51
52 Standard_EXPORT void SetGraphicValues (const Standard_Real Radius, const Standard_Real OffSet);
53
42cf5bc1 54protected:
55
42cf5bc1 56 Standard_EXPORT void UpdateDisplay() Standard_OVERRIDE;
57
42cf5bc1 58private:
59
42cf5bc1 60 Standard_EXPORT void DefineLines();
61
62 Standard_EXPORT void DefinePoints();
63
475c2302 64private:
65
5f6e3a07 66 //! Custom Graphic3d_Structure implementation.
67 class CircularGridStructure;
68
69private:
70
42cf5bc1 71 Handle(Graphic3d_Structure) myStructure;
72 Handle(Graphic3d_Group) myGroup;
73 gp_Ax3 myCurViewPlane;
74 V3d_ViewerPointer myViewer;
75 Standard_Boolean myCurAreDefined;
5f6e3a07 76 Standard_Boolean myToComputePrs;
42cf5bc1 77 Aspect_GridDrawMode myCurDrawMode;
78 Standard_Real myCurXo;
79 Standard_Real myCurYo;
80 Standard_Real myCurAngle;
81 Standard_Real myCurStep;
82 Standard_Integer myCurDivi;
83 Standard_Real myRadius;
84 Standard_Real myOffSet;
85
42cf5bc1 86};
87
475c2302 88DEFINE_STANDARD_HANDLE(V3d_CircularGrid, Aspect_CircularGrid)
42cf5bc1 89
90#endif // _V3d_CircularGrid_HeaderFile