0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / DrawTrSurf / DrawTrSurf_Curve2d.hxx
1 // Created on: 1992-05-22
2 // Created by: Jean Claude VAUTHIER
3 // Copyright (c) 1992-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_Curve2d_HeaderFile
18 #define _DrawTrSurf_Curve2d_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Draw_Color.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <DrawTrSurf_Drawable.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Standard_OStream.hxx>
29 #include <Draw_Interpretor.hxx>
30 class Geom2d_Curve;
31 class Draw_Color;
32 class Draw_Display;
33 class Draw_Drawable3D;
34
35
36 class DrawTrSurf_Curve2d;
37 DEFINE_STANDARD_HANDLE(DrawTrSurf_Curve2d, DrawTrSurf_Drawable)
38
39 //! This class defines a drawable curve in 2d space.
40 //! The curve is drawned in the plane XOY.
41 class DrawTrSurf_Curve2d : public DrawTrSurf_Drawable
42 {
43
44 public:
45
46   
47
48   //! creates a drawable curve from a curve of package Geom2d.
49   Standard_EXPORT DrawTrSurf_Curve2d(const Handle(Geom2d_Curve)& C, const Standard_Boolean DispOrigin = Standard_True);
50   
51   Standard_EXPORT DrawTrSurf_Curve2d(const Handle(Geom2d_Curve)& C, const Draw_Color& aColor, const Standard_Integer Discret, const Standard_Boolean DispOrigin = Standard_True, const Standard_Boolean DispCurvRadius = Standard_False, const Standard_Real RadiusMax = 1.0e3, const Standard_Real RatioOfRadius = 0.1);
52   
53   Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
54   
55     Handle(Geom2d_Curve) GetCurve() const;
56   
57     void SetColor (const Draw_Color& aColor);
58   
59     void ShowCurvature();
60   
61     void ClearCurvature();
62   
63     void SetRadiusMax (const Standard_Real Radius);
64   
65     void SetRadiusRatio (const Standard_Real Ratio);
66   
67     Draw_Color Color() const;
68   
69     Standard_Real RadiusMax() const;
70   
71     Standard_Real RadiusRatio() const;
72   
73   //! For variable copy.
74   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
75   
76   //! For variable dump.
77   Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
78   
79   //! Returns False.
80   Standard_EXPORT virtual Standard_Boolean Is3D() const Standard_OVERRIDE;
81   
82   //! For variable whatis command. Set  as a result  the
83   //! type of the variable.
84   Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
85
86
87
88
89   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Curve2d,DrawTrSurf_Drawable)
90
91 protected:
92
93
94   Handle(Geom2d_Curve) curv;
95   Draw_Color look;
96   Standard_Boolean disporigin;
97   Standard_Boolean dispcurvradius;
98   Standard_Real radiusmax;
99   Standard_Real radiusratio;
100
101
102 private:
103
104
105
106
107 };
108
109
110 #include <DrawTrSurf_Curve2d.lxx>
111
112
113
114
115
116 #endif // _DrawTrSurf_Curve2d_HeaderFile