Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:15:23

0001 // Created on: 1992-05-22
0002 // Created by: Jean Claude VAUTHIER
0003 // Copyright (c) 1992-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_BezierSurface_HeaderFile
0018 #define _DrawTrSurf_BezierSurface_HeaderFile
0019 
0020 #include <Draw_Color.hxx>
0021 #include <DrawTrSurf_Surface.hxx>
0022 
0023 class Geom_BezierSurface;
0024 
0025 class DrawTrSurf_BezierSurface : public DrawTrSurf_Surface
0026 {
0027   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BezierSurface, DrawTrSurf_Surface)
0028   Draw_Drawable3D_FACTORY
0029 public:
0030   //! creates a drawable Bezier curve from a Bezier curve of package Geom.
0031   Standard_EXPORT DrawTrSurf_BezierSurface(const occ::handle<Geom_BezierSurface>& S);
0032 
0033   Standard_EXPORT DrawTrSurf_BezierSurface(const occ::handle<Geom_BezierSurface>& S,
0034                                            const int                              NbUIsos,
0035                                            const int                              NbVIsos,
0036                                            const Draw_Color&                      BoundsColor,
0037                                            const Draw_Color&                      IsosColor,
0038                                            const Draw_Color&                      PolesColor,
0039                                            const bool                             ShowPoles,
0040                                            const int                              Discret,
0041                                            const double                           Deflection,
0042                                            const int                              DrawMode);
0043 
0044   Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0045 
0046   void ShowPoles() { drawPoles = true; }
0047 
0048   void ClearPoles() { drawPoles = false; }
0049 
0050   Standard_EXPORT void FindPole(const double        X,
0051                                 const double        Y,
0052                                 const Draw_Display& D,
0053                                 const double        Prec,
0054                                 int&                UIndex,
0055                                 int&                VIndex) const;
0056 
0057   void SetPolesColor(const Draw_Color& theColor) { polesLook = theColor; }
0058 
0059   Draw_Color PolesColor() const { return polesLook; }
0060 
0061   //! For variable copy.
0062   Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0063 
0064 private:
0065   bool       drawPoles;
0066   Draw_Color polesLook;
0067 };
0068 
0069 #endif // _DrawTrSurf_BezierSurface_HeaderFile