0025950: Bad performance of intersection algorithm.
[occt.git] / src / DrawTrSurf / DrawTrSurf_Drawable.hxx
1 // Created on: 1991-07-16
2 // Created by: Christophe MARION
3 // Copyright (c) 1991-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 _DrawTrSurf_Drawable_HeaderFile
18 #define _DrawTrSurf_Drawable_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <Draw_Drawable3D.hxx>
26 #include <GeomAbs_IsoType.hxx>
27 class Adaptor2d_Curve2d;
28 class Draw_Display;
29 class Adaptor3d_Curve;
30 class Adaptor3d_IsoCurve;
31
32
33 class DrawTrSurf_Drawable;
34 DEFINE_STANDARD_HANDLE(DrawTrSurf_Drawable, Draw_Drawable3D)
35
36 //! this  class adds   to   the Drawable3D methods  to
37 //! display Curves and Curves on Surface.
38 //!
39 //! The discretisation,  number  of points on a Curve,
40 //! is stored in this class.
41 class DrawTrSurf_Drawable : public Draw_Drawable3D
42 {
43
44 public:
45
46   
47   //! Draw a polygon of the curve on the Display
48   Standard_EXPORT void DrawCurve2dOn (Adaptor2d_Curve2d& C, Draw_Display& D) const;
49   
50   //! Draw a polygon of the curve on the Display
51   Standard_EXPORT void DrawCurveOn (Adaptor3d_Curve& C, Draw_Display& D) const;
52   
53   //! Load C  with the specified iso  and Draw a polygon
54   //! of the curve on the Display
55   Standard_EXPORT void DrawIsoCurveOn (Adaptor3d_IsoCurve& C, const GeomAbs_IsoType T, const Standard_Real P, const Standard_Real F, const Standard_Real L, Draw_Display& D) const;
56   
57   //! this is defined only to tell C++ not to complain
58   //! about inheriting a pure virtual method.
59   Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE = 0;
60   
61     void SetDiscretisation (const Standard_Integer Discret);
62   
63     Standard_Integer GetDiscretisation() const;
64   
65     void SetDeflection (const Standard_Real Deflection);
66   
67     Standard_Real GetDeflection() const;
68   
69     void SetDrawMode (const Standard_Integer DrawMode);
70   
71     Standard_Integer GetDrawMode() const;
72
73
74
75
76   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Drawable,Draw_Drawable3D)
77
78 protected:
79
80   
81   //! set the number of points on a curve at creation.
82   Standard_EXPORT DrawTrSurf_Drawable(const Standard_Integer discret, const Standard_Real deflection = 0.01, const Standard_Integer DrawMode = 0);
83
84
85
86 private:
87
88
89   Standard_Integer myDrawMode;
90   Standard_Integer myDiscret;
91   Standard_Real myDeflection;
92
93
94 };
95
96
97 #include <DrawTrSurf_Drawable.lxx>
98
99
100
101
102
103 #endif // _DrawTrSurf_Drawable_HeaderFile