0024762: Visualization - new interactive object AIS_ColoredShape with customized...
[occt.git] / src / AIS / AIS_Drawer.lxx
1 // Created on: 1996-12-19
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1996-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 inline Standard_Boolean AIS_Drawer::WasLastLocal() const
18 {
19   return Standard_False;
20 }
21
22 inline Standard_Boolean AIS_Drawer::HasLocalAttributes() const
23 {
24   return hasLocalAttributes;
25 }
26
27 inline Standard_Real AIS_Drawer::PreviousDeviationCoefficient() const
28 {
29   return myhasOwnDeviationCoefficient ? myPreviousDeviationCoefficient : 0.0;
30 }
31
32 inline Standard_Real AIS_Drawer::PreviousHLRDeviationCoefficient() const
33 {
34   return myhasOwnHLRDeviationCoefficient ? myPreviousHLRDeviationCoefficient : 0.0;
35 }
36
37 inline Standard_Real AIS_Drawer::PreviousDeviationAngle() const
38 {
39   return myhasOwnDeviationAngle ? myPreviousDeviationAngle : 0.0;
40 }
41
42 inline Standard_Real AIS_Drawer::PreviousHLRDeviationAngle() const
43 {
44   return myhasOwnHLRDeviationAngle ? myPreviousHLRDeviationAngle : 0.0;
45 }
46
47 inline void AIS_Drawer::Link (const Handle(Prs3d_Drawer)& theDrawer)
48 {
49   myLink = theDrawer;
50 }
51
52 inline Standard_Boolean AIS_Drawer::HasLink() const
53 {
54   return !myLink.IsNull();
55 }
56
57 inline void AIS_Drawer::SetDeviationCoefficient()
58 {
59   myhasOwnDeviationCoefficient = Standard_False;
60 }
61
62 inline void AIS_Drawer::SetHLRDeviationCoefficient()
63 {
64   myhasOwnHLRDeviationCoefficient = Standard_False;
65 }
66
67 inline void AIS_Drawer::SetDeviationAngle()
68 {
69   myhasOwnDeviationAngle = Standard_False;
70 }
71
72 inline void AIS_Drawer::SetHLRAngle()
73 {
74   myhasOwnHLRDeviationAngle = Standard_False;
75 }
76
77 inline Standard_Boolean AIS_Drawer::IsOwnDeviationCoefficient() const
78 {
79   return myhasOwnDeviationCoefficient;
80 }
81
82 inline Standard_Boolean AIS_Drawer::IsOwnDeviationAngle() const
83 {
84   return myhasOwnDeviationAngle;
85 }
86
87 inline Standard_Boolean AIS_Drawer::IsOwnHLRDeviationCoefficient() const
88 {
89   return myhasOwnHLRDeviationCoefficient;
90 }
91
92 inline Standard_Boolean AIS_Drawer::IsOwnHLRDeviationAngle() const
93 {
94   return myhasOwnHLRDeviationAngle;
95 }
96
97 inline Standard_Boolean AIS_Drawer::HasTextAspect() const
98 {
99   return !myTextAspect.IsNull();
100 }
101
102 inline Standard_Boolean AIS_Drawer::HasWireAspect() const
103 {
104   return !myWireAspect.IsNull();
105 }
106
107 inline Standard_Boolean AIS_Drawer::HasLineAspect() const
108 {
109   return !myLineAspect.IsNull();
110 }
111
112 inline Standard_Boolean AIS_Drawer::HasShadingAspect() const
113 {
114   return !myShadingAspect.IsNull();
115 }
116
117 inline Standard_Boolean AIS_Drawer::HasPointAspect() const
118 {
119   return !myPointAspect.IsNull();
120 }
121
122 inline Standard_Boolean AIS_Drawer::HasDatumAspect() const
123 {
124   return !myDatumAspect.IsNull();
125 }
126
127 inline Standard_Boolean AIS_Drawer::HasPlaneAspect() const
128 {
129   return !myPlaneAspect.IsNull();
130 }
131
132 inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryDraw() const
133 {
134   return myHasOwnFaceBoundaryDraw;
135 }
136
137 inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryAspect() const
138 {
139   return !myFaceBoundaryAspect.IsNull();
140 }
141
142 inline void AIS_Drawer::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
143 {
144   myTypeOfHLR = theTypeOfHLR;
145 }
146
147 inline Prs3d_TypeOfHLR AIS_Drawer::TypeOfHLR() const
148 {
149   return (myTypeOfHLR == Prs3d_TOH_NotSet) ? myLink->TypeOfHLR() : myTypeOfHLR;
150 }
151
152 inline Standard_Boolean AIS_Drawer::HasDimensionAspect() const
153 {
154   return !myDimensionAspect.IsNull();
155 }