0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / Contap / Contap_SurfFunction.lxx
CommitLineData
733a0e55
S
1// File: Contap_SurfFunction.lxx
2// Created: Thu Jun 3 15:23:20 1993
3// Author: Jacques GOUSSARD
4// Copyright: OPEN CASCADE 2000
5
7fd59977 6#include <StdFail_UndefinedDerivative.hxx>
7
8inline void Contap_SurfFunction::Set(const gp_Pnt& Eye)
9{
10 myType = Contap_ContourPrs; // pers
11 myEye = Eye;
12 myAng = 0.;
13}
14
15inline void Contap_SurfFunction::Set(const gp_Dir& Direction)
16{
17 myType = Contap_ContourStd; // Contour app
18 myDir = Direction;
19 myAng = 0.;
20}
21
22inline void Contap_SurfFunction::Set(const gp_Dir& Direction,
23 const Standard_Real Angle)
24{
25 myType = Contap_DraftStd; // Contour vu
26 myDir = Direction;
27 myAng = Angle;
c6541a0c 28 myCosAng = Cos(M_PI/2.+Angle);
7fd59977 29}
30
31inline void Contap_SurfFunction::Set(const gp_Pnt& Eye,
32 const Standard_Real Angle)
33{
34 myType = Contap_DraftPrs; // Contour vu "conique"...
35 myEye = Eye;
36 myAng = Angle;
c6541a0c 37 myCosAng = Cos(M_PI/2.+Angle);
7fd59977 38}
39
40inline void Contap_SurfFunction::Set(const Standard_Real Tolerance)
41{
42 tol = Max(Tolerance, 1.e-12);
43}
44
45inline const gp_Pnt& Contap_SurfFunction::Point () const
46{
47 return solpt;
48}
49
50inline Standard_Real Contap_SurfFunction::Root () const
51{
52 return valf;
53}
54
55inline Standard_Real Contap_SurfFunction::Tolerance () const
56{
57 return tol;
58}
59
60inline const gp_Vec& Contap_SurfFunction::Direction3d()
61{
62 if (IsTangent()) StdFail_UndefinedDerivative::Raise();
63 return d3d;
64}
65
66inline const gp_Dir2d& Contap_SurfFunction::Direction2d()
67{
68 if (IsTangent()) StdFail_UndefinedDerivative::Raise();
69 return d2d;
70}
71
72inline const TheSurface& Contap_SurfFunction::Surface() const
73{
74 return mySurf;
75}
76
77inline const gp_Pnt& Contap_SurfFunction::Eye() const
78{
79 return myEye;
80}
81
82inline const gp_Dir& Contap_SurfFunction::Direction() const
83{
84 return myDir;
85}
86
87inline Standard_Real Contap_SurfFunction::Angle () const
88{
89 return myAng;
90}
91
92inline Contap_TFunction Contap_SurfFunction::FunctionType () const
93{
94 return myType;
95}