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 _StdPrs_WFShape_H__
15 #define _StdPrs_WFShape_H__
17 #include <Prs3d_Root.hxx>
18 #include <Prs3d_Presentation.hxx>
19 #include <Prs3d_Drawer.hxx>
20 #include <TopTools_HSequenceOfShape.hxx>
21 #include <Quantity_Length.hxx>
22 #include <Prs3d_WFShape.hxx>
23 #include <StdPrs_WFRestrictedFace.hxx>
24 #include <StdPrs_Curve.hxx>
25 #include <StdPrs_Vertex.hxx>
27 class StdPrs_WFShape : public Prs3d_Root
32 //! Add shape to presentation
33 static inline void Add (const Handle (Prs3d_Presentation)& thePrs,
34 const TopoDS_Shape& theShape,
35 const Handle (Prs3d_Drawer)& theDrawer)
39 Prs3d_WFShape anAlgo (aFaceAlgo, aCurveAlgo);
40 anAlgo.Add (thePrs, theShape, theDrawer);
43 static inline Handle(TopTools_HSequenceOfShape) PickCurve
44 (const Quantity_Length theX,
45 const Quantity_Length theY,
46 const Quantity_Length theZ,
47 const Quantity_Length theDistance,
48 const TopoDS_Shape& theShape,
49 const Handle (Prs3d_Drawer)& theDrawer)
53 Prs3d_WFShape anAlgo (aFaceAlgo, aCurveAlgo);
54 return anAlgo.PickCurve (theX, theY, theZ, theDistance, theShape, theDrawer);
57 static inline Handle(TopTools_HSequenceOfShape) PickPatch
58 (const Quantity_Length theX,
59 const Quantity_Length theY,
60 const Quantity_Length theZ,
61 const Quantity_Length theDistance,
62 const TopoDS_Shape& theShape,
63 const Handle(Prs3d_Drawer)& theDrawer)
67 Prs3d_WFShape anAlgo (aFaceAlgo, aCurveAlgo);
68 return anAlgo.PickPatch (theX, theY, theZ, theDistance, theShape, theDrawer);
73 class Face : public Prs3d_WFShape::Face
76 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
77 const Handle(BRepAdaptor_HSurface)& theFace,
78 const Standard_Boolean theToDrawUIso,
79 const Standard_Boolean theToDrawVIso,
80 const Quantity_Length theDeflection,
81 const Standard_Integer theNBUiso,
82 const Standard_Integer theNBViso,
83 const Handle(Prs3d_Drawer)& theDrawer,
84 Prs3d_NListOfSequenceOfPnt& theCurves) const
86 StdPrs_WFRestrictedFace::Add (thePrs, theFace, theToDrawUIso, theToDrawVIso, theDeflection,
87 theNBUiso, theNBViso, theDrawer, theCurves);
90 virtual Standard_Boolean Match (const Quantity_Length theX,
91 const Quantity_Length theY,
92 const Quantity_Length theZ,
93 const Quantity_Length theDistance,
94 const Handle(BRepAdaptor_HSurface)& theFace,
95 const Handle(Prs3d_Drawer)& theDrawer) const
97 return StdPrs_WFRestrictedFace::Match (theX, theY, theZ, theDistance, theFace, theDrawer);
101 class Curve : public Prs3d_WFShape::Curve
104 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
105 Adaptor3d_Curve& theCurve,
106 const Quantity_Length theDeflection,
107 const Handle(Prs3d_Drawer)& theDrawer,
108 TColgp_SequenceOfPnt& thePoints,
109 const Standard_Boolean theToDrawCurve) const
111 StdPrs_Curve::Add (thePrs, theCurve, theDeflection, theDrawer, thePoints, theToDrawCurve);
114 virtual Standard_Boolean Match (const Quantity_Length theX,
115 const Quantity_Length theY,
116 const Quantity_Length theZ,
117 const Quantity_Length theDistance,
118 const Adaptor3d_Curve& theCurve,
119 const Handle(Prs3d_Drawer)& theDrawer) const
121 return StdPrs_Curve::Match (theX, theY, theZ, theDistance, theCurve, theDrawer);
127 #endif // _StdPrs_WFShape_H__