42cf5bc1 |
1 | // Created on: 1994-01-17 |
2 | // Created by: Modelistation |
3 | // Copyright (c) 1994-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 _Prs3d_PlaneAspect_HeaderFile |
18 | #define _Prs3d_PlaneAspect_HeaderFile |
19 | |
42cf5bc1 |
20 | #include <Quantity_Length.hxx> |
21 | #include <Quantity_PlaneAngle.hxx> |
4e1bc39a |
22 | #include <Prs3d_LineAspect.hxx> |
42cf5bc1 |
23 | |
24 | //! A framework to define the display of planes. |
25 | class Prs3d_PlaneAspect : public Prs3d_BasicAspect |
26 | { |
4e1bc39a |
27 | DEFINE_STANDARD_RTTIEXT(Prs3d_PlaneAspect, Prs3d_BasicAspect) |
42cf5bc1 |
28 | public: |
29 | |
42cf5bc1 |
30 | //! Constructs an empty framework for the display of planes. |
31 | Standard_EXPORT Prs3d_PlaneAspect(); |
32 | |
33 | //! Returns the attributes of displayed edges involved in the presentation of planes. |
4e1bc39a |
34 | const Handle(Prs3d_LineAspect)& EdgesAspect() const { return myEdgesAspect; } |
35 | |
42cf5bc1 |
36 | //! Returns the attributes of displayed isoparameters involved in the presentation of planes. |
4e1bc39a |
37 | const Handle(Prs3d_LineAspect)& IsoAspect() const { return myIsoAspect; } |
42cf5bc1 |
38 | |
39 | //! Returns the settings for displaying an arrow. |
4e1bc39a |
40 | const Handle(Prs3d_LineAspect)& ArrowAspect() const { return myArrowAspect; } |
42cf5bc1 |
41 | |
4e1bc39a |
42 | void SetArrowsLength (const Quantity_Length theLength) { myArrowsLength = theLength; } |
42cf5bc1 |
43 | |
44 | //! Returns the length of the arrow shaft used in the display of arrows. |
4e1bc39a |
45 | Quantity_Length ArrowsLength() const { return myArrowsLength; } |
42cf5bc1 |
46 | |
47 | //! Sets the angle of the arrowhead used in the display of planes. |
4e1bc39a |
48 | void SetArrowsSize (const Quantity_Length theSize) { myArrowsSize = theSize; } |
42cf5bc1 |
49 | |
50 | //! Returns the size of arrows used in the display of planes. |
4e1bc39a |
51 | Quantity_Length ArrowsSize() const { return myArrowsSize; } |
52 | |
42cf5bc1 |
53 | //! Sets the angle of the arrowhead used in the display |
54 | //! of arrows involved in the presentation of planes. |
4e1bc39a |
55 | void SetArrowsAngle (const Quantity_PlaneAngle theAngle) { myArrowsAngle = theAngle; } |
42cf5bc1 |
56 | |
57 | //! Returns the angle of the arrowhead used in the |
58 | //! display of arrows involved in the presentation of planes. |
4e1bc39a |
59 | Quantity_PlaneAngle ArrowsAngle() const { return myArrowsAngle; } |
42cf5bc1 |
60 | |
61 | //! Sets the display attributes defined in DisplayCenterArrow to active. |
4e1bc39a |
62 | void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; } |
42cf5bc1 |
63 | |
64 | //! Returns true if the display of center arrows is allowed. |
4e1bc39a |
65 | Standard_Boolean DisplayCenterArrow() const { return myDrawCenterArrow; } |
42cf5bc1 |
66 | |
67 | //! Sets the display attributes defined in DisplayEdgesArrows to active. |
4e1bc39a |
68 | void SetDisplayEdgesArrows (const Standard_Boolean theToDraw) { myDrawEdgesArrows = theToDraw; } |
42cf5bc1 |
69 | |
70 | //! Returns true if the display of edge arrows is allowed. |
4e1bc39a |
71 | Standard_Boolean DisplayEdgesArrows() const { return myDrawEdgesArrows; } |
42cf5bc1 |
72 | |
4e1bc39a |
73 | void SetDisplayEdges (const Standard_Boolean theToDraw) { myDrawEdges = theToDraw; } |
42cf5bc1 |
74 | |
4e1bc39a |
75 | Standard_Boolean DisplayEdges() const { return myDrawEdges; } |
42cf5bc1 |
76 | |
77 | //! Sets the display attributes defined in DisplayIso to active. |
4e1bc39a |
78 | void SetDisplayIso (const Standard_Boolean theToDraw) { myDrawIso = theToDraw; } |
42cf5bc1 |
79 | |
80 | //! Returns true if the display of isoparameters is allowed. |
4e1bc39a |
81 | Standard_Boolean DisplayIso() const { return myDrawIso; } |
42cf5bc1 |
82 | |
4e1bc39a |
83 | void SetPlaneLength (const Quantity_Length theLX, const Quantity_Length theLY) |
84 | { |
85 | myPlaneXLength = theLX; |
86 | myPlaneYLength = theLY; |
87 | } |
42cf5bc1 |
88 | |
89 | //! Returns the length of the x axis used in the display of planes. |
4e1bc39a |
90 | Quantity_Length PlaneXLength() const { return myPlaneXLength; } |
42cf5bc1 |
91 | |
92 | //! Returns the length of the y axis used in the display of planes. |
4e1bc39a |
93 | Quantity_Length PlaneYLength() const { return myPlaneYLength; } |
42cf5bc1 |
94 | |
95 | //! Sets the distance L between isoparameters used in the display of planes. |
4e1bc39a |
96 | void SetIsoDistance (const Quantity_Length theL) { myIsoDistance = theL; } |
42cf5bc1 |
97 | |
98 | //! Returns the distance between isoparameters used in the display of planes. |
4e1bc39a |
99 | Quantity_Length IsoDistance() const { return myIsoDistance; } |
42cf5bc1 |
100 | |
101 | protected: |
102 | |
42cf5bc1 |
103 | Handle(Prs3d_LineAspect) myEdgesAspect; |
104 | Handle(Prs3d_LineAspect) myIsoAspect; |
105 | Handle(Prs3d_LineAspect) myArrowAspect; |
106 | Quantity_Length myArrowsLength; |
107 | Quantity_Length myArrowsSize; |
108 | Quantity_PlaneAngle myArrowsAngle; |
4e1bc39a |
109 | Quantity_Length myPlaneXLength; |
110 | Quantity_Length myPlaneYLength; |
111 | Quantity_Length myIsoDistance; |
42cf5bc1 |
112 | Standard_Boolean myDrawCenterArrow; |
113 | Standard_Boolean myDrawEdgesArrows; |
114 | Standard_Boolean myDrawEdges; |
115 | Standard_Boolean myDrawIso; |
42cf5bc1 |
116 | |
117 | }; |
118 | |
4e1bc39a |
119 | DEFINE_STANDARD_HANDLE(Prs3d_PlaneAspect, Prs3d_BasicAspect) |
42cf5bc1 |
120 | |
121 | #endif // _Prs3d_PlaneAspect_HeaderFile |