d5f74e42 |
1 | // Copyright (c) 2013-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
d7223c76 |
14 | #ifndef _StdPrs_WFShape_H__ |
15 | #define _StdPrs_WFShape_H__ |
7fd59977 |
16 | |
d7223c76 |
17 | #include <Prs3d_Root.hxx> |
d7223c76 |
18 | #include <Prs3d_Drawer.hxx> |
5ad8c033 |
19 | #include <Prs3d_Presentation.hxx> |
20 | #include <Prs3d_PointAspect.hxx> |
21 | #include <Prs3d_LineAspect.hxx> |
1b9f5d95 |
22 | #include <Prs3d_NListOfSequenceOfPnt.hxx> |
5ad8c033 |
23 | #include <TColgp_SequenceOfPnt.hxx> |
24 | #include <TopoDS_Shape.hxx> |
25 | #include <TopTools_ListOfShape.hxx> |
7fd59977 |
26 | |
5ad8c033 |
27 | //! Tool for computing wireframe presentation of a TopoDS_Shape. |
c151c0f1 |
28 | class StdPrs_WFShape : public Prs3d_Root |
29 | { |
c151c0f1 |
30 | public: |
31 | |
5ad8c033 |
32 | //! Computes wireframe presentation of a shape. |
33 | //! @param thePresentation [in] the presentation. |
34 | //! @param theShape [in] the shape. |
35 | //! @param theDrawer [in] the draw settings. |
36 | Standard_EXPORT static void Add (const Handle (Prs3d_Presentation)& thePresentation, |
37 | const TopoDS_Shape& theShape, |
38 | const Handle (Prs3d_Drawer)& theDrawer); |
c151c0f1 |
39 | |
40 | private: |
41 | |
5ad8c033 |
42 | //! Compute edge presentations for a shape. |
5ad8c033 |
43 | //! @param theEdges [in] the list of edges. |
5ad8c033 |
44 | //! @param theDrawer [in] the drawer settings. |
45 | //! @param theShapeDeflection [in] the deflection for the wireframe shape. |
1b9f5d95 |
46 | static void addEdges (const TopTools_ListOfShape& theEdges, |
47 | const Handle(Prs3d_Drawer)& theDrawer, |
48 | const Standard_Real theShapeDeflection, |
49 | Prs3d_NListOfSequenceOfPnt& thePolylines); |
c151c0f1 |
50 | |
5ad8c033 |
51 | //! Compute free and boundary edges on a triangulation of a face. |
52 | //! @param thePresentation [in] the presentation. |
53 | //! @param theFaces [in] the list of triangulated faces. |
54 | //! @param theAspect [in] the edge drawing aspect. |
55 | //! @param theDrawer [in] the drawer settings. |
56 | static void addEdgesOnTriangulation (const Handle(Prs3d_Presentation)& thePresentation, |
57 | const TopTools_ListOfShape& theFaces, |
58 | const Handle (Prs3d_LineAspect)& theAspect); |
c151c0f1 |
59 | |
5ad8c033 |
60 | //! Compute vertex presentation for a shape. |
61 | //! @param thePresentation [in] the presentation. |
62 | //! @param theVertices [in] the list of points. |
63 | //! @param theAspect [in] the point drawing aspect. |
64 | static void addVertices (const Handle (Prs3d_Presentation)& thePresentation, |
65 | const TColgp_SequenceOfPnt& theVertices, |
66 | const Handle (Prs3d_PointAspect)& theAspect); |
c151c0f1 |
67 | }; |
68 | |
69 | #endif // _StdPrs_WFShape_H__ |