Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-03-06
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_Triangulation_HeaderFile
0018 #define _DrawTrSurf_Triangulation_HeaderFile
0019 
0020 #include <TColStd_HArray1OfInteger.hxx>
0021 #include <Draw_Drawable3D.hxx>
0022 #include <Draw_Interpretor.hxx>
0023 
0024 class Poly_Triangulation;
0025 
0026 DEFINE_STANDARD_HANDLE(DrawTrSurf_Triangulation, Draw_Drawable3D)
0027 
0028 //! Used to display a triangulation.
0029 //!
0030 //! Display internal edges in blue
0031 //! Display boundary edges in red
0032 //! Optional display of triangles and nodes indices.
0033 class DrawTrSurf_Triangulation : public Draw_Drawable3D
0034 {
0035   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Triangulation, Draw_Drawable3D)
0036   Draw_Drawable3D_FACTORY
0037 public:
0038   
0039   Standard_EXPORT DrawTrSurf_Triangulation (const Handle(Poly_Triangulation)& T);
0040 
0041   Handle(Poly_Triangulation) Triangulation() const { return myTriangulation; }
0042 
0043   void ShowNodes (const Standard_Boolean theB) { myNodes = theB; }
0044 
0045   Standard_Boolean ShowNodes() const { return myNodes; }
0046 
0047   void ShowTriangles (const Standard_Boolean theB) { myTriangles = theB; }
0048 
0049   Standard_Boolean ShowTriangles() const { return myTriangles; }
0050 
0051   Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0052 
0053   //! For variable copy.
0054   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0055 
0056   //! For variable dump.
0057   Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
0058 
0059   //! Save drawable into stream.
0060   Standard_EXPORT virtual void Save (Standard_OStream& theStream) const Standard_OVERRIDE;
0061 
0062   //! For variable whatis command. Set as a result the type of the variable.
0063   Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
0064 
0065 private:
0066 
0067   Handle(Poly_Triangulation) myTriangulation;
0068   Handle(TColStd_HArray1OfInteger) myInternals;
0069   Handle(TColStd_HArray1OfInteger) myFree;
0070   Standard_Boolean myNodes;
0071   Standard_Boolean myTriangles;
0072 
0073 };
0074 
0075 #endif // _DrawTrSurf_Triangulation_HeaderFile