0023959: Getting rid of generic classes in Visualization: generic classes were remove...
[occt.git] / src / Prs3d / Prs3d_PlaneAspect.cxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
3 //
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
8 //
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 //
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
18
19 #include <Prs3d_PlaneAspect.ixx>
20
21 Prs3d_PlaneAspect::Prs3d_PlaneAspect()
22 {
23   myEdgesAspect = new Prs3d_LineAspect(Quantity_NOC_GREEN,Aspect_TOL_SOLID,1.);
24   myIsoAspect = new Prs3d_LineAspect(Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5);
25   myArrowAspect = new Prs3d_LineAspect(Quantity_NOC_PEACHPUFF,Aspect_TOL_SOLID,1.);
26   myDrawCenterArrow = Standard_False;
27   myDrawEdgesArrows = Standard_False;
28   myDrawEdges = Standard_True;
29   myDrawIso = Standard_False;
30   myIsoDistance = 0.5;
31   myPlaneXLength= 1.;
32   myPlaneYLength= 1.;
33   myArrowsLength= 0.02;
34   myArrowsSize=0.1;
35   myArrowsAngle=M_PI/8.;
36 }
37
38 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::EdgesAspect() const
39 {
40   return myEdgesAspect;
41 }
42
43 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::IsoAspect() const
44 {
45   return myIsoAspect;
46 }
47
48 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::ArrowAspect() const
49 {
50   return myArrowAspect;
51 }
52
53 void Prs3d_PlaneAspect::SetDisplayCenterArrow(const Standard_Boolean draw)
54 {
55   myDrawCenterArrow = draw;
56 }
57
58 void Prs3d_PlaneAspect::SetDisplayEdgesArrows(const Standard_Boolean draw)
59 {
60   myDrawEdgesArrows = draw;
61 }
62
63 void Prs3d_PlaneAspect::SetDisplayEdges(const Standard_Boolean draw)
64 {
65   myDrawEdges = draw;
66 }
67
68 void Prs3d_PlaneAspect::SetDisplayIso(const Standard_Boolean draw)
69 {
70   myDrawIso = draw;
71 }
72
73 Standard_Boolean Prs3d_PlaneAspect::DisplayCenterArrow() const
74 {
75   return myDrawCenterArrow;
76 }
77
78 Standard_Boolean Prs3d_PlaneAspect::DisplayEdgesArrows() const
79 {
80   return myDrawEdgesArrows;
81 }
82
83 Standard_Boolean Prs3d_PlaneAspect::DisplayEdges() const
84 {
85   return myDrawEdges;
86 }
87
88 Standard_Boolean Prs3d_PlaneAspect::DisplayIso() const
89 {
90   return myDrawIso;
91 }
92
93 void Prs3d_PlaneAspect::SetPlaneLength(const Quantity_Length lX,
94                                        const Quantity_Length lY)
95 {
96   myPlaneXLength = lX;
97   myPlaneYLength = lY;
98 }
99
100 Quantity_Length Prs3d_PlaneAspect::PlaneXLength() const
101 {
102   return myPlaneXLength;
103 }
104
105 Quantity_Length Prs3d_PlaneAspect::PlaneYLength() const
106 {
107   return myPlaneYLength;
108 }
109
110 void Prs3d_PlaneAspect::SetIsoDistance(const Quantity_Length l) 
111 {
112   myIsoDistance = l;
113 }
114
115 Quantity_Length Prs3d_PlaneAspect::IsoDistance() const
116 {
117   return myIsoDistance;
118 }
119
120 void Prs3d_PlaneAspect::SetArrowsLength(const Quantity_Length L)
121 {
122   myArrowsLength = L;
123 }
124
125 Quantity_Length Prs3d_PlaneAspect::ArrowsLength() const
126 {
127   return myArrowsLength;
128 }
129
130 void Prs3d_PlaneAspect::SetArrowsSize(const Quantity_Length L)
131 {
132   myArrowsSize = L;
133 }
134
135 Quantity_Length Prs3d_PlaneAspect::ArrowsSize() const
136 {
137   return myArrowsSize;
138 }
139
140 void Prs3d_PlaneAspect::SetArrowsAngle(const Quantity_PlaneAngle ang)
141 {
142   myArrowsAngle = ang;
143 }
144
145 Quantity_Length Prs3d_PlaneAspect::ArrowsAngle() const
146 {
147   return myArrowsAngle;
148 }
149
150
151
152
153
154
155
156
157
158
159
160