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