0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / IntRes2d / IntRes2d_IntersectionPoint.hxx
1 // Created on: 1992-04-03
2 // Created by: Laurent BUCHARD
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 _IntRes2d_IntersectionPoint_HeaderFile
18 #define _IntRes2d_IntersectionPoint_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <gp_Pnt2d.hxx>
25 #include <Standard_Real.hxx>
26 #include <IntRes2d_Transition.hxx>
27 #include <Standard_Boolean.hxx>
28 class gp_Pnt2d;
29 class IntRes2d_Transition;
30
31
32 //! Definition of an intersection point between two
33 //! 2D curves.
34 class IntRes2d_IntersectionPoint 
35 {
36 public:
37
38   DEFINE_STANDARD_ALLOC
39
40   
41   //! Empty constructor.
42   Standard_EXPORT IntRes2d_IntersectionPoint();
43   
44   //! Creates an IntersectionPoint.
45   //! if ReversedFlag is False, the parameter Uc1(resp. Uc2)
46   //! and the Transition Trans1 (resp. Trans2) refer to
47   //! the first curve (resp. second curve) otherwise Uc1
48   //! and Trans1 (resp. Uc2 and Trans2) refer to the
49   //! second curve (resp. the first curve).
50     IntRes2d_IntersectionPoint(const gp_Pnt2d& P, const Standard_Real Uc1, const Standard_Real Uc2, const IntRes2d_Transition& Trans1, const IntRes2d_Transition& Trans2, const Standard_Boolean ReversedFlag);
51   
52   //! Sets the values for an existing intersection
53   //! point. The meaning of the parameters are the same
54   //! as for the Create.
55     void SetValues (const gp_Pnt2d& P, const Standard_Real Uc1, const Standard_Real Uc2, const IntRes2d_Transition& Trans1, const IntRes2d_Transition& Trans2, const Standard_Boolean ReversedFlag);
56   
57   //! Returns the value of the coordinates of the
58   //! intersection point in the 2D space.
59     const gp_Pnt2d& Value() const;
60   
61   //! Returns the parameter on the first curve.
62     Standard_Real ParamOnFirst() const;
63   
64   //! Returns the parameter on the second curve.
65     Standard_Real ParamOnSecond() const;
66   
67   //! Returns the transition of the 1st curve compared to
68   //! the 2nd one.
69     const IntRes2d_Transition& TransitionOfFirst() const;
70   
71   //! returns the transition of the 2nd curve compared to
72   //! the 1st one.
73     const IntRes2d_Transition& TransitionOfSecond() const;
74
75
76
77
78 protected:
79
80
81
82
83
84 private:
85
86
87
88   gp_Pnt2d pt;
89   Standard_Real p1;
90   Standard_Real p2;
91   IntRes2d_Transition trans1;
92   IntRes2d_Transition trans2;
93
94
95 };
96
97
98 #include <IntRes2d_IntersectionPoint.lxx>
99
100
101
102
103
104 #endif // _IntRes2d_IntersectionPoint_HeaderFile