Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-03-09
0002 // Created by: Laurent PAINNOT
0003 // Copyright (c) 1995-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_Polygon3D_HeaderFile
0018 #define _DrawTrSurf_Polygon3D_HeaderFile
0019 
0020 #include <Draw_Drawable3D.hxx>
0021 #include <Draw_Interpretor.hxx>
0022 
0023 class Poly_Polygon3D;
0024 
0025 DEFINE_STANDARD_HANDLE(DrawTrSurf_Polygon3D, Draw_Drawable3D)
0026 
0027 //! Used to display a 3d polygon.
0028 //! Optional display of nodes.
0029 class DrawTrSurf_Polygon3D : public Draw_Drawable3D
0030 {
0031   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Polygon3D, Draw_Drawable3D)
0032   Draw_Drawable3D_FACTORY
0033 public:
0034 
0035   Standard_EXPORT DrawTrSurf_Polygon3D (const Handle(Poly_Polygon3D)& P);
0036 
0037   Handle(Poly_Polygon3D) Polygon3D() const { return myPolygon3D; }
0038 
0039   void ShowNodes (const Standard_Boolean theB) { myNodes = theB; }
0040 
0041   Standard_Boolean ShowNodes() const { return myNodes; }
0042 
0043   Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0044   
0045   //! For variable copy.
0046   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0047   
0048   //! For variable dump.
0049   Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
0050 
0051   //! Save drawable into stream.
0052   Standard_EXPORT virtual void Save (Standard_OStream& theStream) const Standard_OVERRIDE;
0053 
0054   //! For variable whatis command. Set  as a result  the
0055   //! type of the variable.
0056   Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
0057 
0058 private:
0059 
0060   Handle(Poly_Polygon3D) myPolygon3D;
0061   Standard_Boolean myNodes;
0062 
0063 };
0064 
0065 #endif // _DrawTrSurf_Polygon3D_HeaderFile