5c5e0e7b5d1e5003fb6b2a87a785ecc163890bad
[occt.git] / src / IntImp / IntImp_ZerImpFunc.lxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #include <StdFail_UndefinedDerivative.hxx>
16
17 inline void IntImp_ZerImpFunc::Set (const ThePSurface& PS)
18 {
19   surf =  (Standard_Address)(&PS);
20 }
21
22 inline void IntImp_ZerImpFunc::SetImplicitSurface (const TheISurface& IS)
23 {
24   func =  (Standard_Address)(&IS);
25 }
26
27 inline void IntImp_ZerImpFunc::Set (const Standard_Real Tol)
28 {
29   tol = Tol;
30 }
31
32 inline Standard_Real IntImp_ZerImpFunc::Root() const 
33
34   return valf;
35 }
36
37 inline Standard_Real IntImp_ZerImpFunc::Tolerance() const 
38
39   return tol;
40 }
41
42 inline const gp_Pnt& IntImp_ZerImpFunc::Point() const 
43 {
44   return pntsol;
45 }
46
47 inline const gp_Vec& IntImp_ZerImpFunc::Direction3d()
48 {
49   if (IsTangent()) StdFail_UndefinedDerivative::Raise();       
50   return d3d;
51 }
52
53 inline const gp_Dir2d& IntImp_ZerImpFunc::Direction2d()
54 {
55   if (IsTangent()) StdFail_UndefinedDerivative::Raise();       
56   return d2d;
57 }
58
59 inline const ThePSurface& IntImp_ZerImpFunc::PSurface() const 
60 {
61   return  (*((ThePSurface *)(surf)));
62 }
63
64 inline const TheISurface& IntImp_ZerImpFunc::ISurface() const 
65
66   return  (*((TheISurface *)(func)));
67 }
68