0025814: Visualization, Prs3d_WFShape::AddPolygon() - always use polygonal representa...
[occt.git] / src / Prs3d / Prs3d_WFShape.hxx
CommitLineData
d5f74e42 1// Copyright (c) 2013-2014 OPEN CASCADE SAS
d7223c76 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
d7223c76 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.
d7223c76 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
d7223c76 13
14#ifndef _Prs3d_WFShape_H__
15#define _Prs3d_WFShape_H__
16
d7223c76 17#include <Prs3d_Root.hxx>
d7223c76 18#include <Prs3d_NListOfSequenceOfPnt.hxx>
d7223c76 19#include <TopTools_HSequenceOfShape.hxx>
c151c0f1 20#include <Quantity_Length.hxx>
21
22class Adaptor3d_Curve;
23class TopoDS_Edge;
24class TopoDS_Shape;
25class TColgp_SequenceOfPnt;
26class Handle(BRepAdaptor_HSurface);
27class Handle(Prs3d_Drawer);
d7223c76 28
d7223c76 29class Prs3d_WFShape : Prs3d_Root
30{
c151c0f1 31
d7223c76 32public:
33
34 DEFINE_STANDARD_ALLOC
35
d7223c76 36public:
37
c151c0f1 38 class Face
d7223c76 39 {
c151c0f1 40 public:
41 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
42 const Handle(BRepAdaptor_HSurface)& theFace,
43 const Standard_Boolean theToDrawUIso,
44 const Standard_Boolean theToDrawVIso,
45 const Quantity_Length theDeflection,
46 const Standard_Integer theNBUiso,
47 const Standard_Integer theNBViso,
48 const Handle(Prs3d_Drawer)& theDrawer,
49 Prs3d_NListOfSequenceOfPnt& theCurves) const = 0;
50
51 virtual Standard_Boolean Match (const Quantity_Length theX,
52 const Quantity_Length theY,
53 const Quantity_Length theZ,
54 const Quantity_Length theDistance,
55 const Handle(BRepAdaptor_HSurface)& theFace,
56 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
57 };
58
59 class Curve
d7223c76 60 {
c151c0f1 61 public:
62 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
63 Adaptor3d_Curve& theCurve,
64 const Quantity_Length theDeflection,
65 const Handle(Prs3d_Drawer)& theDrawer,
66 TColgp_SequenceOfPnt& thePoints,
67 const Standard_Boolean theToDrawCurve) const = 0;
68
69 virtual Standard_Boolean Match (const Quantity_Length theX,
70 const Quantity_Length theY,
71 const Quantity_Length theZ,
72 const Quantity_Length theDistance,
73 const Adaptor3d_Curve& theCurve,
74 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
75 };
76
77 inline Prs3d_WFShape (const Face& theFace,
78 const Curve& theCurve)
79 : myFaceAlgo (theFace),
80 myCurveAlgo (theCurve) {}
d7223c76 81
c151c0f1 82public:
d7223c76 83
c151c0f1 84 //! Add shape to presentation
85 Standard_EXPORT void Add (const Handle (Prs3d_Presentation)& thePresentation,
86 const TopoDS_Shape& theShape,
87 const Handle (Prs3d_Drawer)& theDrawer);
d7223c76 88
c151c0f1 89 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickCurve
d7223c76 90 (const Quantity_Length theX,
91 const Quantity_Length theY,
92 const Quantity_Length theZ,
93 const Quantity_Length theDistance,
94 const TopoDS_Shape& theShape,
c151c0f1 95 const Handle (Prs3d_Drawer)& theDrawer);
d7223c76 96
c151c0f1 97 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickPatch
d7223c76 98 (const Quantity_Length theX,
99 const Quantity_Length theY,
100 const Quantity_Length theZ,
101 const Quantity_Length theDistance,
102 const TopoDS_Shape& theShape,
c151c0f1 103 const Handle(Prs3d_Drawer)& theDrawer);
d7223c76 104
c151c0f1 105private:
d7223c76 106
c151c0f1 107 static Standard_Boolean AddPolygon (const TopoDS_Edge& theEdge,
c151c0f1 108 TColgp_SequenceOfPnt& thePoints);
d7223c76 109
c151c0f1 110private:
111
112 const Face& myFaceAlgo;
113 const Curve& myCurveAlgo;
114
115private:
d7223c76 116
c151c0f1 117 Prs3d_WFShape (const Prs3d_WFShape& );
118 Prs3d_WFShape& operator= (const Prs3d_WFShape& );
d7223c76 119
120};
121
c151c0f1 122#endif // _Prs3d_WFShape_H__