0030322: Remove DRAW-command "mesh" as useless
[occt.git] / src / MeshTest / MeshTest_DrawableMesh.hxx
1 // Copyright (c) 2013-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #ifndef _MeshTest_DrawableMesh_HeaderFile
15 #define _MeshTest_DrawableMesh_HeaderFile
16
17 #include <Standard.hxx>
18 #include <Standard_Type.hxx>
19 #include <BRepMesh_IncrementalMesh.hxx>
20 #include <TColStd_SequenceOfInteger.hxx>
21 #include <Draw_Drawable3D.hxx>
22 #include <Standard_OStream.hxx>
23 #include <Draw_Interpretor.hxx>
24
25 class TopoDS_Shape;
26 class Draw_Display;
27
28 //! A drawable mesh. 
29 //! Provides a mesh object inherited from Drawable3d to draw a triangulation.
30 //! It contains a sequence of highlighted edges and highlighted vertices. <br>
31 class MeshTest_DrawableMesh : public Draw_Drawable3D
32 {
33 public:
34   
35   Standard_EXPORT MeshTest_DrawableMesh();
36   
37   Standard_EXPORT MeshTest_DrawableMesh(const TopoDS_Shape& theShape,
38                                         const Standard_Real theDeflection);
39   
40   Standard_EXPORT MeshTest_DrawableMesh(const Handle(BRepMesh_IncrementalMesh)& theMesher);
41   
42   Standard_EXPORT void Add(const TopoDS_Shape& theShape);
43   
44   Standard_EXPORT TColStd_SequenceOfInteger& Edges();
45   
46   Standard_EXPORT TColStd_SequenceOfInteger& Vertices();
47   
48   Standard_EXPORT TColStd_SequenceOfInteger& Triangles();
49   
50   Standard_EXPORT void DrawOn(Draw_Display& theDisplay) const Standard_OVERRIDE;
51   
52   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
53   
54   Standard_EXPORT virtual void Dump(Standard_OStream& theStream) const Standard_OVERRIDE;
55   
56   Standard_EXPORT virtual void Whatis(Draw_Interpretor& theDi) const Standard_OVERRIDE;
57   
58   Standard_EXPORT const Handle(BRepMesh_IncrementalMesh)& Mesher() const;
59
60   DEFINE_STANDARD_RTTIEXT(MeshTest_DrawableMesh,Draw_Drawable3D)
61
62 private: 
63
64   Handle(BRepMesh_IncrementalMesh) myMesher;
65   Standard_Real                    myDeflection;
66   TColStd_SequenceOfInteger        myEdges;
67   TColStd_SequenceOfInteger        myVertices;
68   TColStd_SequenceOfInteger        myTriangles;
69 };
70
71 DEFINE_STANDARD_HANDLE(MeshTest_DrawableMesh, Draw_Drawable3D)
72
73 #endif