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_RectangularGrid_HeaderFile |
18 | #define _V3d_RectangularGrid_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 <Aspect_RectangularGrid.hxx> |
29 | class Graphic3d_Structure; |
30 | class Graphic3d_Group; |
42cf5bc1 |
31 | |
32 | class V3d_RectangularGrid : public Aspect_RectangularGrid |
33 | { |
475c2302 |
34 | DEFINE_STANDARD_RTTIEXT(V3d_RectangularGrid, Aspect_RectangularGrid) |
42cf5bc1 |
35 | public: |
36 | |
42cf5bc1 |
37 | Standard_EXPORT V3d_RectangularGrid(const V3d_ViewerPointer& aViewer, const Quantity_Color& aColor, const Quantity_Color& aTenthColor); |
475c2302 |
38 | |
39 | Standard_EXPORT virtual ~V3d_RectangularGrid(); |
42cf5bc1 |
40 | |
475c2302 |
41 | Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor) Standard_OVERRIDE; |
42cf5bc1 |
42 | |
475c2302 |
43 | Standard_EXPORT virtual void Display() Standard_OVERRIDE; |
42cf5bc1 |
44 | |
475c2302 |
45 | Standard_EXPORT virtual void Erase() const Standard_OVERRIDE; |
42cf5bc1 |
46 | |
475c2302 |
47 | Standard_EXPORT virtual Standard_Boolean IsDisplayed() const Standard_OVERRIDE; |
42cf5bc1 |
48 | |
49 | Standard_EXPORT void GraphicValues (Standard_Real& XSize, Standard_Real& YSize, Standard_Real& OffSet) const; |
50 | |
51 | Standard_EXPORT void SetGraphicValues (const Standard_Real XSize, const Standard_Real YSize, const Standard_Real OffSet); |
52 | |
42cf5bc1 |
53 | protected: |
42cf5bc1 |
54 | |
475c2302 |
55 | Standard_EXPORT virtual void UpdateDisplay() Standard_OVERRIDE; |
42cf5bc1 |
56 | |
57 | private: |
58 | |
42cf5bc1 |
59 | Standard_EXPORT void DefineLines(); |
60 | |
61 | Standard_EXPORT void DefinePoints(); |
62 | |
475c2302 |
63 | private: |
64 | |
42cf5bc1 |
65 | Handle(Graphic3d_Structure) myStructure; |
66 | Handle(Graphic3d_Group) myGroup; |
67 | gp_Ax3 myCurViewPlane; |
68 | V3d_ViewerPointer myViewer; |
69 | Standard_Boolean myCurAreDefined; |
70 | Aspect_GridDrawMode myCurDrawMode; |
71 | Standard_Real myCurXo; |
72 | Standard_Real myCurYo; |
73 | Standard_Real myCurAngle; |
74 | Standard_Real myCurXStep; |
75 | Standard_Real myCurYStep; |
76 | Standard_Real myXSize; |
77 | Standard_Real myYSize; |
78 | Standard_Real myOffSet; |
79 | |
42cf5bc1 |
80 | }; |
81 | |
475c2302 |
82 | DEFINE_STANDARD_HANDLE(V3d_RectangularGrid, Aspect_RectangularGrid) |
42cf5bc1 |
83 | |
84 | #endif // _V3d_RectangularGrid_HeaderFile |