1// Created on: 1992-10-01
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
17inline IntRes2d_IntersectionPoint::IntRes2d_IntersectionPoint
18      (const gp_Pnt2d& P,
19       const Standard_Real Uc1, const Standard_Real Uc2,
20       const IntRes2d_Transition& Trans1,
21       const IntRes2d_Transition& Trans2,
22       const Standard_Boolean ReversedFlag):
23  pt(P),p1(Uc1),p2(Uc2),trans1(Trans1),trans2(Trans2)
24{
25  if(ReversedFlag) {
26    trans1=Trans2;
27    trans2=Trans1;
28    p1=Uc2;
29    p2=Uc1;
30  }
31}
32
33
34inline void IntRes2d_IntersectionPoint::SetValues
35  (const gp_Pnt2d& P,
36   const Standard_Real Uc1, const Standard_Real Uc2,
37   const IntRes2d_Transition& Trans1,
38   const IntRes2d_Transition& Trans2,
39   const Standard_Boolean ReversedFlag)
40{
41  pt=P;
42  if (!ReversedFlag) {
43    trans1 = Trans1;
44    trans2 = Trans2;
45    p1 = Uc1;
46    p2 = Uc2;
47  }
48  else {
49    trans1 = Trans2;
50    trans2 = Trans1;
51    p1 = Uc2;
52    p2 = Uc1;
53  }
54}
55
56inline const gp_Pnt2d &IntRes2d_IntersectionPoint::Value () const {
57  return pt;
58}
59
60inline Standard_Real IntRes2d_IntersectionPoint::ParamOnFirst () const {
61  return p1;
62}
63
64inline Standard_Real IntRes2d_IntersectionPoint::ParamOnSecond () const {
65  return p2;
66}
67
68inline const IntRes2d_Transition& IntRes2d_IntersectionPoint::TransitionOfFirst () const {
69  return trans1;
70}
71
72inline const IntRes2d_Transition& IntRes2d_IntersectionPoint::TransitionOfSecond ()
73     const {
74       return trans2;
75     }
76