fc9b36d6 |
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_DefineHandle.hxx> |
ceb418e1 |
19 | #include <BRepMesh_IncrementalMesh.hxx> |
fc9b36d6 |
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> |
25 | |
26 | class TopoDS_Shape; |
27 | class TColStd_SequenceOfInteger; |
28 | class Draw_Display; |
29 | class Draw_Drawable3D; |
30 | |
31 | //! A drawable mesh. |
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 |
35 | { |
36 | public: |
37 | |
38 | Standard_EXPORT MeshTest_DrawableMesh(); |
39 | |
ceb418e1 |
40 | Standard_EXPORT MeshTest_DrawableMesh(const TopoDS_Shape& theShape, |
41 | const Standard_Real theDeflection); |
fc9b36d6 |
42 | |
ceb418e1 |
43 | Standard_EXPORT MeshTest_DrawableMesh(const Handle(BRepMesh_IncrementalMesh)& theMesher); |
fc9b36d6 |
44 | |
ceb418e1 |
45 | Standard_EXPORT void Add(const TopoDS_Shape& theShape); |
fc9b36d6 |
46 | |
ceb418e1 |
47 | Standard_EXPORT TColStd_SequenceOfInteger& Edges(); |
fc9b36d6 |
48 | |
ceb418e1 |
49 | Standard_EXPORT TColStd_SequenceOfInteger& Vertices(); |
fc9b36d6 |
50 | |
ceb418e1 |
51 | Standard_EXPORT TColStd_SequenceOfInteger& Triangles(); |
fc9b36d6 |
52 | |
ceb418e1 |
53 | Standard_EXPORT void DrawOn(Draw_Display& theDisplay) const; |
fc9b36d6 |
54 | |
ceb418e1 |
55 | Standard_EXPORT virtual Handle_Draw_Drawable3D Copy() const; |
fc9b36d6 |
56 | |
ceb418e1 |
57 | Standard_EXPORT virtual void Dump(Standard_OStream& theStream) const; |
fc9b36d6 |
58 | |
ceb418e1 |
59 | Standard_EXPORT virtual void Whatis(Draw_Interpretor& theDi) const; |
fc9b36d6 |
60 | |
ceb418e1 |
61 | Standard_EXPORT const Handle(BRepMesh_IncrementalMesh)& Mesher() const; |
fc9b36d6 |
62 | |
63 | DEFINE_STANDARD_RTTI(MeshTest_DrawableMesh) |
64 | |
65 | private: |
66 | |
ceb418e1 |
67 | Handle(BRepMesh_IncrementalMesh) myMesher; |
68 | Standard_Real myDeflection; |
69 | TColStd_SequenceOfInteger myEdges; |
70 | TColStd_SequenceOfInteger myVertices; |
71 | TColStd_SequenceOfInteger myTriangles; |
fc9b36d6 |
72 | }; |
73 | |
74 | DEFINE_STANDARD_HANDLE(MeshTest_DrawableMesh, Draw_Drawable3D) |
75 | |
76 | #endif |