0024660: Removing unused "generic" classes. Part 1
[occt.git] / src / Contap / Contap_SurfFunction.lxx
1 // Created on: 1993-06-03
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-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 #include <StdFail_UndefinedDerivative.hxx>
18
19 inline void Contap_SurfFunction::Set(const gp_Pnt& Eye)
20 {
21   myType = Contap_ContourPrs; // pers
22   myEye = Eye;
23   myAng = 0.;
24 }
25
26 inline void Contap_SurfFunction::Set(const gp_Dir& Direction)
27 {
28   myType = Contap_ContourStd; // Contour app
29   myDir = Direction;
30   myAng = 0.;
31 }
32
33 inline void Contap_SurfFunction::Set(const gp_Dir& Direction,
34                                      const Standard_Real Angle)
35 {
36   myType = Contap_DraftStd; // Contour vu
37   myDir = Direction;
38   myAng = Angle;
39   myCosAng = Cos(M_PI/2.+Angle);
40 }
41
42 inline void Contap_SurfFunction::Set(const gp_Pnt& Eye,
43                                      const Standard_Real Angle)
44 {
45   myType = Contap_DraftPrs; // Contour vu "conique"...
46   myEye = Eye;
47   myAng = Angle;
48   myCosAng = Cos(M_PI/2.+Angle);
49 }
50
51 inline void Contap_SurfFunction::Set(const Standard_Real Tolerance)
52 {
53   tol = Max(Tolerance, 1.e-12);
54 }
55
56 inline const gp_Pnt& Contap_SurfFunction::Point () const
57 {
58   return solpt;
59 }
60
61 inline Standard_Real Contap_SurfFunction::Root () const
62 {
63   return valf;
64 }
65
66 inline Standard_Real Contap_SurfFunction::Tolerance () const
67 {
68   return tol;
69 }
70
71 inline const gp_Vec& Contap_SurfFunction::Direction3d()
72 {
73   if (IsTangent()) StdFail_UndefinedDerivative::Raise();       
74   return d3d;
75 }
76
77 inline const gp_Dir2d& Contap_SurfFunction::Direction2d()
78 {
79   if (IsTangent()) StdFail_UndefinedDerivative::Raise();       
80   return d2d;
81 }
82
83 inline const TheSurface& Contap_SurfFunction::Surface() const
84 {
85   return mySurf;
86 }
87
88 inline const gp_Pnt& Contap_SurfFunction::Eye() const
89 {
90   return myEye;
91 }
92
93 inline const gp_Dir& Contap_SurfFunction::Direction() const
94 {
95   return myDir;
96 }
97
98 inline Standard_Real Contap_SurfFunction::Angle () const
99 {
100   return myAng;
101 }
102
103 inline Contap_TFunction Contap_SurfFunction::FunctionType () const
104 {
105   return myType;
106 }