0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / StdPrs / StdPrs_DeflectionCurve.hxx
1 // Created on: 1992-12-15
2 // Created by: Jean Louis FRENKEL
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _StdPrs_DeflectionCurve_HeaderFile
18 #define _StdPrs_DeflectionCurve_HeaderFile
19
20 #include <Prs3d_Root.hxx>
21 #include <Prs3d_Drawer.hxx>
22 #include <TColgp_SequenceOfPnt.hxx>
23
24 class Adaptor3d_Curve;
25
26 //! A framework to provide display of any curve with
27 //! respect to the maximal chordal deviation defined in
28 //! the Prs3d_Drawer attributes manager.
29 class StdPrs_DeflectionCurve  : public Prs3d_Root
30 {
31 public:
32
33   DEFINE_STANDARD_ALLOC
34
35   
36   //! adds to the presentation aPresentation the drawing of the curve
37   //! aCurve with respect to the maximal chordial deviation defined
38   //! by the drawer aDrawer.
39   //! The aspect is defined by LineAspect in aDrawer.
40   //! If drawCurve equals Standard_False the curve will not be displayed,
41   //! it is used if the curve is a part of some shape and PrimitiveArray
42   //! visualization approach is activated (it is activated by default).
43   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True);
44   
45   //! adds to the presentation aPresentation the drawing of the curve
46   //! aCurve with respect to the maximal chordial deviation defined
47   //! by the drawer aDrawer.
48   //! The aspect is defined by LineAspect in aDrawer.
49   //! The drawing will be limited between the points of parameter U1 and U2.
50   //! If drawCurve equals Standard_False the curve will not be displayed,
51   //! it is used if the curve is a part of some shape and PrimitiveArray
52   //! visualization approach is activated (it is activated by default).
53   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True);
54   
55   //! adds to the presentation aPresentation the drawing of the curve
56   //! aCurve with respect to the maximal chordial deviation aDeflection.
57   //! The aspect is the current aspect
58   //! If drawCurve equals Standard_False the curve will not be displayed,
59   //! it is used if the curve is a part of some shape and PrimitiveArray
60   //! visualization approach is activated (it is activated by default).
61   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, Adaptor3d_Curve& aCurve, const Standard_Real aDeflection, const Standard_Real aLimit, const Standard_Real anAngle = 0.2, const Standard_Boolean drawCurve = Standard_True);
62   
63   //! adds to the presentation aPresentation the drawing of the curve
64   //! aCurve with respect to the maximal chordial deviation aDeflection.
65   //! The aspect is the current aspect
66   //! Points give a sequence of curve points.
67   //! If drawCurve equals Standard_False the curve will not be displayed,
68   //! it is used if the curve is a part of some shape and PrimitiveArray
69   //! visualization approach is activated (it is activated by default).
70   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, Adaptor3d_Curve& aCurve, const Standard_Real aDeflection, const Handle(Prs3d_Drawer)& aDrawer, TColgp_SequenceOfPnt& Points, const Standard_Boolean drawCurve = Standard_True);
71   
72   //! adds to the presentation aPresentation the drawing of the curve
73   //! aCurve with respect to the maximal chordial deviation aDeflection.
74   //! The aspect is the current aspect
75   //! The drawing will be limited between the points of parameter U1 and U2.
76   //! Points give a sequence of curve points.
77   //! If drawCurve equals Standard_False the curve will not be displayed,
78   //! it is used if the curve is a part of some shape and PrimitiveArray
79   //! visualization approach is activated (it is activated by default).
80   Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Standard_Real aDeflection, TColgp_SequenceOfPnt& Points, const Standard_Real anAngle = 0.2, const Standard_Boolean drawCurve = Standard_True);
81   
82   //! returns true if the distance between the point (X,Y,Z) and the
83   //! drawing of the curve aCurve with respect of the maximal
84   //! chordial deviation defined by the drawer aDrawer is less then aDistance.
85   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer);
86   
87   //! returns true if the distance between the point (X,Y,Z) and the
88   //! drawing of the curve aCurve with respect of the maximal
89   //! chordial deviation defined by the drawer aDrawer is less
90   //! then aDistance. The drawing is considered between the points
91   //! of parameter U1 and U2;
92   Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer);
93
94   //! Returns true if the distance between the point (theX, theY, theZ)
95   //! and the drawing with respect of the maximal chordial deviation theDeflection is less then theDistance.
96   Standard_EXPORT static Standard_Boolean Match (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance,
97                                                  const Adaptor3d_Curve& theCurve,
98                                                  const Standard_Real theDeflection, const Standard_Real theLimit, const Standard_Real theAngle);
99
100   //! Returns true if the distance between the point (theX, theY, theZ)
101   //! and the drawing with respect of the maximal chordial deviation theDeflection is less then theDistance.
102   //! The drawing is considered between the points of parameter theU1 and theU2.
103   Standard_EXPORT static Standard_Boolean Match (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, const Standard_Real theDistance,
104                                                  const Adaptor3d_Curve& theCurve, const Standard_Real theU1, const Standard_Real theU2,
105                                                  const Standard_Real theDeflection, const Standard_Real theAngle);
106
107 };
108
109 #endif // _StdPrs_DeflectionCurve_HeaderFile