Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:25

0001 // Created on: 1991-07-16
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1991-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _DrawTrSurf_Drawable_HeaderFile
0018 #define _DrawTrSurf_Drawable_HeaderFile
0019 
0020 #include <Draw_Drawable3D.hxx>
0021 #include <GeomAbs_IsoType.hxx>
0022 
0023 class Adaptor2d_Curve2d;
0024 class Adaptor3d_Curve;
0025 class Adaptor3d_IsoCurve;
0026 
0027 DEFINE_STANDARD_HANDLE(DrawTrSurf_Drawable, Draw_Drawable3D)
0028 
0029 //! this  class adds   to   the Drawable3D methods  to
0030 //! display Curves and Curves on Surface.
0031 //!
0032 //! The discretisation,  number  of points on a Curve,
0033 //! is stored in this class.
0034 class DrawTrSurf_Drawable : public Draw_Drawable3D
0035 {
0036   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Drawable, Draw_Drawable3D)
0037 public:
0038 
0039   //! Draw a polygon of the curve on the Display
0040   Standard_EXPORT void DrawCurve2dOn (Adaptor2d_Curve2d& C, Draw_Display& D) const;
0041   
0042   //! Draw a polygon of the curve on the Display
0043   Standard_EXPORT void DrawCurveOn (Adaptor3d_Curve& C, Draw_Display& D) const;
0044   
0045   //! Load C  with the specified iso  and Draw a polygon
0046   //! of the curve on the Display
0047   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;
0048   
0049   //! this is defined only to tell C++ not to complain
0050   //! about inheriting a pure virtual method.
0051   Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE = 0;
0052 
0053   void SetDiscretisation (const Standard_Integer theDiscret) { myDiscret = theDiscret; }
0054 
0055   Standard_Integer GetDiscretisation() const { return myDiscret; }
0056 
0057   void SetDeflection (const Standard_Real theDeflection) { myDeflection = theDeflection; }
0058 
0059   Standard_Real GetDeflection() const { return myDeflection; }
0060 
0061   void SetDrawMode (const Standard_Integer theDrawMode) { myDrawMode = theDrawMode; }
0062 
0063   Standard_Integer GetDrawMode() const { return myDrawMode; }
0064 
0065 protected:
0066 
0067   //! set the number of points on a curve at creation.
0068   Standard_EXPORT DrawTrSurf_Drawable(const Standard_Integer discret, const Standard_Real deflection = 0.01, const Standard_Integer DrawMode = 0);
0069 
0070 private:
0071 
0072   Standard_Integer myDrawMode;
0073   Standard_Integer myDiscret;
0074   Standard_Real myDeflection;
0075 
0076 };
0077 
0078 #endif // _DrawTrSurf_Drawable_HeaderFile