0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IntPatch / IntPatch_Point.lxx
1 // Created on: 1992-05-06
2 // Created by: Jacques GOUSSARD
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 inline IntPatch_Point::IntPatch_Point ()
18  : para(0.0), tol(0.0), tgt(Standard_False), mult(Standard_False),
19    onS1(Standard_False), vtxonS1(Standard_False), prm1(0.0),
20    onS2(Standard_False), vtxonS2(Standard_False), prm2(0.0)
21 {
22 }
23
24
25 inline void IntPatch_Point::SetValue (const gp_Pnt& Pt)
26 {
27   pt.SetValue(Pt);
28 }
29
30 //=======================================================================
31 ////function : SetValue
32 //purpose  : 
33 //=======================================================================
34 inline void IntPatch_Point::SetValue(const IntSurf_PntOn2S& thePOn2S)
35 {
36   pt = thePOn2S;
37 }
38
39 inline void IntPatch_Point::SetTolerance (const Standard_Real Tol)
40 {
41   tol = Tol;
42 }
43
44
45 inline void IntPatch_Point::SetParameters (const Standard_Real U1,
46                                            const Standard_Real V1,
47                                            const Standard_Real U2,
48                                            const Standard_Real V2)
49 {
50   pt.SetValue(U1,V1,U2,V2);
51 }
52
53
54 inline void IntPatch_Point::SetParameter (const Standard_Real Para)
55 {
56   para = Para;
57 }
58
59
60 inline void IntPatch_Point::SetMultiple (const Standard_Boolean IsMult)
61 {
62   mult = IsMult;
63 }
64
65
66 inline const gp_Pnt& IntPatch_Point::Value () const
67 {
68   return pt.Value();
69 }
70
71
72 inline Standard_Real IntPatch_Point::Tolerance () const
73 {
74   return tol;
75 }
76
77
78 inline Standard_Real IntPatch_Point::ParameterOnLine () const
79 {
80   return para;
81 }
82
83
84 inline Standard_Boolean IntPatch_Point::IsTangencyPoint () const
85 {
86   return tgt;
87 }
88
89
90 inline void IntPatch_Point::ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const
91 {
92   pt.ParametersOnS1(U1,V1);
93 }
94
95
96 inline void IntPatch_Point::ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const
97 {
98   pt.ParametersOnS2(U2,V2);
99 }
100
101
102 inline Standard_Boolean IntPatch_Point::IsMultiple () const
103 {
104   return mult;
105 }
106
107
108 inline Standard_Boolean IntPatch_Point::IsOnDomS1 () const
109 {
110   return onS1;
111 }
112
113
114 inline Standard_Boolean IntPatch_Point::IsVertexOnS1 () const
115 {
116   return vtxonS1;
117 }
118
119
120 inline const Handle(Adaptor3d_HVertex)& IntPatch_Point::VertexOnS1 () const
121 {
122   if (!vtxonS1) {throw Standard_DomainError();}
123   return vS1;
124 }
125
126
127 inline const Handle(Adaptor2d_HCurve2d)& IntPatch_Point::ArcOnS1 () const
128 {
129   if (!onS1) {throw Standard_DomainError();}
130   return arcS1;
131 }
132
133
134 inline const IntSurf_Transition& IntPatch_Point::TransitionLineArc1 () const
135 {
136   if (!onS1) {throw Standard_DomainError();}
137   return traline1;
138 }
139
140
141 inline const IntSurf_Transition& IntPatch_Point::TransitionOnS1 () const
142 {
143   if (!onS1) {throw Standard_DomainError();}
144   return tra1;
145 }
146
147
148 inline Standard_Real IntPatch_Point::ParameterOnArc1 () const
149 {
150   if (!onS1) {throw Standard_DomainError();}
151   return prm1;
152 }
153
154
155 inline Standard_Boolean IntPatch_Point::IsOnDomS2 () const
156 {
157   return onS2;
158 }
159
160
161 inline Standard_Boolean IntPatch_Point::IsVertexOnS2 () const
162 {
163   return vtxonS2;
164 }
165
166
167 inline const Handle(Adaptor3d_HVertex)& IntPatch_Point::VertexOnS2 () const
168 {
169   if (!vtxonS2) {throw Standard_DomainError();}
170   return vS2;
171 }
172
173
174 inline const Handle(Adaptor2d_HCurve2d)& IntPatch_Point::ArcOnS2 () const
175 {
176   if (!onS2) {throw Standard_DomainError();}
177   return arcS2;
178 }
179
180
181 inline const IntSurf_Transition& IntPatch_Point::TransitionLineArc2 () const
182 {
183   if (!onS2) {throw Standard_DomainError();}
184   return traline2;
185 }
186
187
188 inline const IntSurf_Transition& IntPatch_Point::TransitionOnS2 () const
189 {
190   if (!onS2) {throw Standard_DomainError();}
191   return tra2;
192 }
193
194
195 inline Standard_Real IntPatch_Point::ParameterOnArc2 () const
196 {
197   if (!onS2) {throw Standard_DomainError();}
198   return prm2;
199 }
200
201
202 inline const IntSurf_PntOn2S& IntPatch_Point::PntOn2S() const
203 {
204   return pt;
205 }
206
207
208 inline void IntPatch_Point::Parameters(Standard_Real& U1, Standard_Real& V1,
209                                        Standard_Real& U2, Standard_Real& V2) const
210 {
211   pt.Parameters(U1,V1,U2,V2);
212 }