0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / VrmlConverter / VrmlConverter_Drawer.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-02-21
2// Created by: Alexander BRIVIN
3// Copyright (c) 1997-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 _VrmlConverter_Drawer_HeaderFile
18#define _VrmlConverter_Drawer_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <Standard_Boolean.hxx>
25#include <Quantity_Length.hxx>
26#include <Aspect_TypeOfDeflection.hxx>
27#include <Standard_Real.hxx>
28#include <MMgt_TShared.hxx>
29class VrmlConverter_IsoAspect;
30class VrmlConverter_LineAspect;
31class VrmlConverter_ShadingAspect;
32class VrmlConverter_PointAspect;
33
34
35class VrmlConverter_Drawer;
36DEFINE_STANDARD_HANDLE(VrmlConverter_Drawer, MMgt_TShared)
37
38//! qualifies the aspect properties for
39//! the VRML conversation of a specific kind of object.
40//! This includes for example color, maximal chordial deviation, etc...
41class VrmlConverter_Drawer : public MMgt_TShared
42{
43
44public:
45
46
47 Standard_EXPORT VrmlConverter_Drawer();
48
49 //! by default: TOD_Relative; however, except for the shapes,
50 //! the drawing will be made using the absolute deviation.
51 Standard_EXPORT void SetTypeOfDeflection (const Aspect_TypeOfDeflection aTypeOfDeflection);
52
53 Standard_EXPORT Aspect_TypeOfDeflection TypeOfDeflection() const;
54
55 //! Defines the maximal chordial deviation when drawing any curve;
56 //! If this value is one of the obvious parameters of methods,
57 //! current value from Drawer won't be used.
58 //! This value is used by:
59 //!
60 //! VrmlConverter_DeflectionCurve
61 //! VrmlConverter_WFDeflectionRestrictedFace
62 //! VrmlConverter_WFDeflectionShape
63 Standard_EXPORT void SetMaximalChordialDeviation (const Quantity_Length aChordialDeviation);
64
65 //! returns the maximal chordial deviation.
66 //! Default value: 0.1
67 Standard_EXPORT Quantity_Length MaximalChordialDeviation() const;
68
69 //! default 0.001
70 Standard_EXPORT void SetDeviationCoefficient (const Standard_Real aCoefficient);
71
72 Standard_EXPORT Standard_Real DeviationCoefficient() const;
73
74 //! default: 17 points.
75 //! Defines the Discretisation (myNbPoints) when drawing any curve;
76 //! If this value is one of the obvious parameters of methods,
77 //! current value from Drawer won't be used.
78 //! This value is used by:
79 //!
80 //! VrmlConverter_Curve
81 //! VrmlConverter_WFRestrictedFace
82 //! VrmlConverter_WFShape
83 Standard_EXPORT void SetDiscretisation (const Standard_Integer d);
84
85 Standard_EXPORT Standard_Integer Discretisation() const;
86
87 //! defines the maximum value allowed for the first and last
88 //! parameters of an infinite curve.
89 //! Default value: 500.
90 //! VrmlConverter_Curve
91 //! VrmlConverter_WFRestrictedFace
92 //! VrmlConverter_WFShape
93 Standard_EXPORT void SetMaximalParameterValue (const Standard_Real Value);
94
95 Standard_EXPORT Standard_Real MaximalParameterValue() const;
96
97 //! enables the drawing of isos on planes.
98 //! By default there are no isos on planes.
99 Standard_EXPORT void SetIsoOnPlane (const Standard_Boolean OnOff);
100
101 //! returns True if the drawing of isos on planes is enabled.
102 Standard_EXPORT Standard_Boolean IsoOnPlane() const;
103
104 //! Defines the attributes which are used when drawing an
105 //! U isoparametric curve of a face. Defines the number
106 //! of U isoparametric curves to be drawn for a single face.
107 //! The default values are the same default values from Vrml package.
108 //!
109 //! These attributes are used by the following algorithms:
110 //! VrmlConverter_WFRestrictedFace
111 //! VrmlConverter_WFDeflectionRestrictedFace
112 Standard_EXPORT Handle(VrmlConverter_IsoAspect) UIsoAspect();
113
114 Standard_EXPORT void SetUIsoAspect (const Handle(VrmlConverter_IsoAspect)& anAspect);
115
116 //! Defines the attributes which are used when drawing an
117 //! V isoparametric curve of a face. Defines the number
118 //! of V isoparametric curves to be drawn for a single face.
119 //! The default values are the same default values from Vrml package.
120 //!
121 //! These attributes are used by the following algorithms:
122 //! VrmlConverter_WFRestrictedFace
123 //! VrmlConverter_WFDeflectionRestrictedFace
124 Standard_EXPORT Handle(VrmlConverter_IsoAspect) VIsoAspect();
125
126 Standard_EXPORT void SetVIsoAspect (const Handle(VrmlConverter_IsoAspect)& anAspect);
127
128
129 //! The default values are the same default values from Vrml package.
130 //! These attributes are used by the following algorithms:
131 //! VrmlConverter_WFShape
132 //! VrmlConverter_WFDeflectionShape
133 Standard_EXPORT Handle(VrmlConverter_LineAspect) FreeBoundaryAspect();
134
135 Standard_EXPORT void SetFreeBoundaryAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
136
137 //! enables the drawing the free boundaries
138 //! By default the free boundaries are drawn.
139 Standard_EXPORT void SetFreeBoundaryDraw (const Standard_Boolean OnOff);
140
141 //! returns True if the drawing of the free boundaries is enabled.
142 Standard_EXPORT Standard_Boolean FreeBoundaryDraw() const;
143
144
145 //! The default values are the same default values from Vrml package.
146 //! These attributes are used by the following algorithms:
147 //! VrmlConverter_WFShape
148 //! VrmlConverter_WFDeflectionShape
149 Standard_EXPORT Handle(VrmlConverter_LineAspect) WireAspect();
150
151 Standard_EXPORT void SetWireAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
152
153 //! enables the drawing the wire
154 //! By default the wire are drawn.
155 Standard_EXPORT void SetWireDraw (const Standard_Boolean OnOff);
156
157 //! returns True if the drawing of the wire is enabled.
158 Standard_EXPORT Standard_Boolean WireDraw() const;
159
160
161 //! The default values are the same default values from Vrml package.
162 //! These attributes are used by the following algorithms:
163 //! VrmlConverter_WFShape
164 //! VrmlConverter_WFDeflectionShape
165 Standard_EXPORT Handle(VrmlConverter_LineAspect) UnFreeBoundaryAspect();
166
167 Standard_EXPORT void SetUnFreeBoundaryAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
168
169 //! enables the drawing the unfree boundaries
170 //! By default the unfree boundaries are drawn.
171 Standard_EXPORT void SetUnFreeBoundaryDraw (const Standard_Boolean OnOff);
172
173 //! returns True if the drawing of the unfree boundaries is enabled.
174 Standard_EXPORT Standard_Boolean UnFreeBoundaryDraw() const;
175
176
177 //! The default values are the same default values from Vrml package.
178 Standard_EXPORT Handle(VrmlConverter_LineAspect) LineAspect();
179
180 Standard_EXPORT void SetLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
181
182 Standard_EXPORT Handle(VrmlConverter_PointAspect) PointAspect();
183
184 Standard_EXPORT void SetPointAspect (const Handle(VrmlConverter_PointAspect)& anAspect);
185
186
187 //! The default values are the same default values from Vrml package.
188 Standard_EXPORT Handle(VrmlConverter_ShadingAspect) ShadingAspect();
189
190 Standard_EXPORT void SetShadingAspect (const Handle(VrmlConverter_ShadingAspect)& anAspect);
191
192 //! returns Standard_True if the hidden lines are to be drawn.
193 //! By default the hidden lines are not drawn.
194 Standard_EXPORT Standard_Boolean DrawHiddenLine() const;
195
196 //! sets DrawHiddenLine = Standard_True - the hidden lines are drawn.
197 Standard_EXPORT void EnableDrawHiddenLine();
198
199 //! sets DrawHiddenLine = Standard_False - the hidden lines are not drawn.
200 Standard_EXPORT void DisableDrawHiddenLine();
201
202 //! returns LineAspect for the hidden lines.
203 //! The default values are the same default values from Vrml package.
204 Standard_EXPORT Handle(VrmlConverter_LineAspect) HiddenLineAspect();
205
206 //! sets LineAspect for the hidden lines.
207 Standard_EXPORT void SetHiddenLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
208
209 //! returns LineAspect for the seen lines.
210 //! The default values are the same default values from Vrml package.
211 Standard_EXPORT Handle(VrmlConverter_LineAspect) SeenLineAspect();
212
213 //! sets LineAspect for the seen lines.
214 Standard_EXPORT void SetSeenLineAspect (const Handle(VrmlConverter_LineAspect)& anAspect);
215
216
217
218
92efcf78 219 DEFINE_STANDARD_RTTIEXT(VrmlConverter_Drawer,MMgt_TShared)
42cf5bc1 220
221protected:
222
223
224
225
226private:
227
228
229 Handle(VrmlConverter_IsoAspect) myUIsoAspect;
230 Handle(VrmlConverter_IsoAspect) myVIsoAspect;
231 Standard_Integer myNbPoints;
232 Standard_Boolean myIsoOnPlane;
233 Handle(VrmlConverter_LineAspect) myFreeBoundaryAspect;
234 Standard_Boolean myFreeBoundaryDraw;
235 Handle(VrmlConverter_LineAspect) myUnFreeBoundaryAspect;
236 Standard_Boolean myUnFreeBoundaryDraw;
237 Handle(VrmlConverter_LineAspect) myWireAspect;
238 Standard_Boolean myWireDraw;
239 Handle(VrmlConverter_LineAspect) myLineAspect;
240 Handle(VrmlConverter_ShadingAspect) myShadingAspect;
241 Quantity_Length myChordialDeviation;
242 Aspect_TypeOfDeflection myTypeOfDeflection;
243 Standard_Real myMaximalParameterValue;
244 Standard_Real myDeviationCoefficient;
245 Handle(VrmlConverter_PointAspect) myPointAspect;
246 Standard_Boolean myDrawHiddenLine;
247 Handle(VrmlConverter_LineAspect) myHiddenLineAspect;
248 Handle(VrmlConverter_LineAspect) mySeenLineAspect;
249
250
251};
252
253
254
255
256
257
258
259#endif // _VrmlConverter_Drawer_HeaderFile