0025180: Visualization - Homogeneous transformation API in TKV3d
[occt.git] / src / Prs3d / Prs3d_PlaneAspect.cxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15
16 #include <Prs3d_LineAspect.hxx>
17 #include <Prs3d_PlaneAspect.hxx>
18 #include <Standard_Type.hxx>
19
20 IMPLEMENT_STANDARD_RTTIEXT(Prs3d_PlaneAspect,Prs3d_BasicAspect)
21
22 Prs3d_PlaneAspect::Prs3d_PlaneAspect()
23 {
24   myEdgesAspect = new Prs3d_LineAspect(Quantity_NOC_GREEN,Aspect_TOL_SOLID,1.);
25   myIsoAspect = new Prs3d_LineAspect(Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5);
26   myArrowAspect = new Prs3d_LineAspect(Quantity_NOC_PEACHPUFF,Aspect_TOL_SOLID,1.);
27   myDrawCenterArrow = Standard_False;
28   myDrawEdgesArrows = Standard_False;
29   myDrawEdges = Standard_True;
30   myDrawIso = Standard_False;
31   myIsoDistance = 0.5;
32   myPlaneXLength= 1.;
33   myPlaneYLength= 1.;
34   myArrowsLength= 0.02;
35   myArrowsSize=0.1;
36   myArrowsAngle=M_PI/8.;
37 }
38
39 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::EdgesAspect() const
40 {
41   return myEdgesAspect;
42 }
43
44 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::IsoAspect() const
45 {
46   return myIsoAspect;
47 }
48
49 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::ArrowAspect() const
50 {
51   return myArrowAspect;
52 }
53
54 void Prs3d_PlaneAspect::SetDisplayCenterArrow(const Standard_Boolean draw)
55 {
56   myDrawCenterArrow = draw;
57 }
58
59 void Prs3d_PlaneAspect::SetDisplayEdgesArrows(const Standard_Boolean draw)
60 {
61   myDrawEdgesArrows = draw;
62 }
63
64 void Prs3d_PlaneAspect::SetDisplayEdges(const Standard_Boolean draw)
65 {
66   myDrawEdges = draw;
67 }
68
69 void Prs3d_PlaneAspect::SetDisplayIso(const Standard_Boolean draw)
70 {
71   myDrawIso = draw;
72 }
73
74 Standard_Boolean Prs3d_PlaneAspect::DisplayCenterArrow() const
75 {
76   return myDrawCenterArrow;
77 }
78
79 Standard_Boolean Prs3d_PlaneAspect::DisplayEdgesArrows() const
80 {
81   return myDrawEdgesArrows;
82 }
83
84 Standard_Boolean Prs3d_PlaneAspect::DisplayEdges() const
85 {
86   return myDrawEdges;
87 }
88
89 Standard_Boolean Prs3d_PlaneAspect::DisplayIso() const
90 {
91   return myDrawIso;
92 }
93
94 void Prs3d_PlaneAspect::SetPlaneLength(const Quantity_Length lX,
95                                        const Quantity_Length lY)
96 {
97   myPlaneXLength = lX;
98   myPlaneYLength = lY;
99 }
100
101 Quantity_Length Prs3d_PlaneAspect::PlaneXLength() const
102 {
103   return myPlaneXLength;
104 }
105
106 Quantity_Length Prs3d_PlaneAspect::PlaneYLength() const
107 {
108   return myPlaneYLength;
109 }
110
111 void Prs3d_PlaneAspect::SetIsoDistance(const Quantity_Length l) 
112 {
113   myIsoDistance = l;
114 }
115
116 Quantity_Length Prs3d_PlaneAspect::IsoDistance() const
117 {
118   return myIsoDistance;
119 }
120
121 void Prs3d_PlaneAspect::SetArrowsLength(const Quantity_Length L)
122 {
123   myArrowsLength = L;
124 }
125
126 Quantity_Length Prs3d_PlaneAspect::ArrowsLength() const
127 {
128   return myArrowsLength;
129 }
130
131 void Prs3d_PlaneAspect::SetArrowsSize(const Quantity_Length L)
132 {
133   myArrowsSize = L;
134 }
135
136 Quantity_Length Prs3d_PlaneAspect::ArrowsSize() const
137 {
138   return myArrowsSize;
139 }
140
141 void Prs3d_PlaneAspect::SetArrowsAngle(const Quantity_PlaneAngle ang)
142 {
143   myArrowsAngle = ang;
144 }
145
146 Quantity_Length Prs3d_PlaneAspect::ArrowsAngle() const
147 {
148   return myArrowsAngle;
149 }
150
151
152
153
154
155
156
157
158
159
160
161