1 // Copyright (c) 2013-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _MeshTest_DrawableMesh_HeaderFile
15 #define _MeshTest_DrawableMesh_HeaderFile
17 #include <Standard.hxx>
18 #include <Standard_DefineHandle.hxx>
19 #include <BRepMesh_FastDiscret.hxx>
20 #include <TColStd_SequenceOfInteger.hxx>
21 #include <Draw_Drawable3D.hxx>
22 #include <Handle_Draw_Drawable3D.hxx>
23 #include <Standard_OStream.hxx>
24 #include <Draw_Interpretor.hxx>
27 class TColStd_SequenceOfInteger;
29 class Draw_Drawable3D;
32 //! Provides a mesh object inherited from Drawable3d to draw a triangulation.
33 //! It contains a sequence of highlighted edges and highlighted vertices. <br>
34 class MeshTest_DrawableMesh : public Draw_Drawable3D
38 Standard_EXPORT MeshTest_DrawableMesh();
40 Standard_EXPORT MeshTest_DrawableMesh(const TopoDS_Shape& S,const Standard_Real Deflect,const Standard_Boolean Partage,const Standard_Boolean InShape = Standard_False);
42 Standard_EXPORT MeshTest_DrawableMesh(const Handle(BRepMesh_FastDiscret)& Tr);
44 Standard_EXPORT void AddInShape(const Standard_Boolean inshape) ;
46 Standard_EXPORT void Add(const TopoDS_Shape& S) ;
48 Standard_EXPORT TColStd_SequenceOfInteger& Edges() ;
50 Standard_EXPORT TColStd_SequenceOfInteger& Vertices() ;
52 Standard_EXPORT TColStd_SequenceOfInteger& Triangles() ;
54 Standard_EXPORT void DrawOn(Draw_Display& dis) const;
56 Standard_EXPORT virtual Handle_Draw_Drawable3D Copy() const;
58 Standard_EXPORT virtual void Dump(Standard_OStream& S) const;
60 Standard_EXPORT virtual void Whatis(Draw_Interpretor& S) const;
62 Standard_EXPORT Handle(BRepMesh_FastDiscret) Mesh() const;
64 DEFINE_STANDARD_RTTI(MeshTest_DrawableMesh)
68 Handle(BRepMesh_FastDiscret) myMesh;
69 Standard_Real myDeflection;
70 TColStd_SequenceOfInteger myEdges;
71 TColStd_SequenceOfInteger myVertices;
72 TColStd_SequenceOfInteger myTriangles;
73 Standard_Boolean myinshape;
76 DEFINE_STANDARD_HANDLE(MeshTest_DrawableMesh, Draw_Drawable3D)