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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _DrawTrSurf_Drawable_HeaderFile
18 #define _DrawTrSurf_Drawable_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <Draw_Drawable3D.hxx>
26 #include <GeomAbs_IsoType.hxx>
27 class Adaptor2d_Curve2d;
29 class Adaptor3d_Curve;
30 class Adaptor3d_IsoCurve;
33 class DrawTrSurf_Drawable;
34 DEFINE_STANDARD_HANDLE(DrawTrSurf_Drawable, Draw_Drawable3D)
36 //! this class adds to the Drawable3D methods to
37 //! display Curves and Curves on Surface.
39 //! The discretisation, number of points on a Curve,
40 //! is stored in this class.
41 class DrawTrSurf_Drawable : public Draw_Drawable3D
47 //! Draw a polygon of the curve on the Display
48 Standard_EXPORT void DrawCurve2dOn (Adaptor2d_Curve2d& C, Draw_Display& D) const;
50 //! Draw a polygon of the curve on the Display
51 Standard_EXPORT void DrawCurveOn (Adaptor3d_Curve& C, Draw_Display& D) const;
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;
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;
61 void SetDiscretisation (const Standard_Integer Discret);
63 Standard_Integer GetDiscretisation() const;
65 void SetDeflection (const Standard_Real Deflection);
67 Standard_Real GetDeflection() const;
69 void SetDrawMode (const Standard_Integer DrawMode);
71 Standard_Integer GetDrawMode() const;
76 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Drawable,Draw_Drawable3D)
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);
89 Standard_Integer myDrawMode;
90 Standard_Integer myDiscret;
91 Standard_Real myDeflection;
97 #include <DrawTrSurf_Drawable.lxx>
103 #endif // _DrawTrSurf_Drawable_HeaderFile