b311480e |
1 | // Created on: 1992-06-10 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
973c2be1 |
8 | // This library is free software; you can redistribute it and / or modify it |
9 | // under the terms of the GNU Lesser General Public 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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | #include <Standard_DomainError.hxx> |
18 | |
19 | ostream& operator << (ostream&, IntRes2d_Transition&); |
20 | |
21 | inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent, |
22 | const IntRes2d_Position Pos, |
23 | const IntRes2d_TypeTrans Type ): |
24 | |
25 | tangent(Tangent),posit(Pos),typetra(Type),situat(IntRes2d_Unknown),oppos(Standard_False) |
26 | |
27 | { |
28 | } |
29 | |
30 | inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent, |
31 | const IntRes2d_Position Pos, |
32 | const IntRes2d_Situation Situ, |
33 | const Standard_Boolean Oppos): |
34 | tangent(Tangent),posit(Pos),typetra(IntRes2d_Touch), |
35 | situat(Situ),oppos(Oppos) |
36 | { |
37 | } |
38 | |
39 | inline IntRes2d_Transition::IntRes2d_Transition (const IntRes2d_Position Pos): |
40 | |
41 | tangent(Standard_True),posit(Pos),typetra(IntRes2d_Undecided),situat(IntRes2d_Unknown),oppos(Standard_False) |
42 | { |
43 | } |
44 | |
45 | inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent, |
46 | const IntRes2d_Position Pos, |
47 | const IntRes2d_TypeTrans Type ) { |
48 | |
49 | tangent=Tangent; |
50 | posit=Pos; |
51 | typetra=Type; |
52 | } |
53 | |
54 | inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent, |
55 | const IntRes2d_Position Pos, |
56 | const IntRes2d_Situation Situ, |
57 | const Standard_Boolean Oppos) { |
58 | |
59 | tangent=Tangent; |
60 | posit=Pos; |
61 | typetra=IntRes2d_Touch; |
62 | situat=Situ; |
63 | oppos=Oppos; |
64 | |
65 | } |
66 | |
67 | inline void IntRes2d_Transition::SetValue (const IntRes2d_Position Pos ) { |
68 | |
69 | posit=Pos; |
70 | typetra=IntRes2d_Undecided; |
71 | } |
72 | |
73 | inline void IntRes2d_Transition::SetPosition (const IntRes2d_Position Pos ) { |
74 | |
75 | posit=Pos; |
76 | } |
77 | |
78 | inline IntRes2d_Position IntRes2d_Transition::PositionOnCurve () const { |
79 | |
80 | return posit; |
81 | } |
82 | |
83 | inline IntRes2d_TypeTrans IntRes2d_Transition::TransitionType () const { |
84 | |
85 | return typetra; |
86 | } |
87 | |
88 | inline Standard_Boolean IntRes2d_Transition::IsTangent () const { |
89 | |
90 | if (typetra==IntRes2d_Undecided) { |
91 | Standard_DomainError::Raise(); |
92 | } |
93 | return tangent; |
94 | } |
95 | |
96 | inline IntRes2d_Situation IntRes2d_Transition::Situation () const { |
97 | |
98 | if (typetra!=IntRes2d_Touch) { |
99 | Standard_DomainError::Raise(); |
100 | } |
101 | return situat; |
102 | } |
103 | |
104 | inline Standard_Boolean IntRes2d_Transition::IsOpposite () const { |
105 | |
106 | if (typetra!=IntRes2d_Touch) { |
107 | Standard_DomainError::Raise(); |
108 | } |
109 | return oppos; |
110 | } |
111 | |