Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Extrema / Extrema_FuncExtCC.lxx
1 //=============================================================================
2
3 inline void Extrema_FuncExtCC::SetCurve (const Standard_Integer theRank, const Curve1& C)
4 {
5   Standard_OutOfRange_Raise_if (theRank < 1 || theRank > 2, "Extrema_FuncExtCC::SetCurve()")
6   if (theRank == 1) {myC1 = (Standard_Address)&C;}
7   else {myC2 = (Standard_Address)&C;}
8 }
9
10 //=============================================================================
11
12 inline void Extrema_FuncExtCC::SetTolerance (const Standard_Real theTol)
13 {
14   myTol = theTol;
15 }
16
17 //=============================================================================
18
19 inline Standard_Integer Extrema_FuncExtCC::NbVariables () const { return 2; }
20
21 //=============================================================================
22
23 inline Standard_Integer Extrema_FuncExtCC::NbEquations () const { return 2; }
24
25 //=============================================================================
26
27 inline Standard_Integer Extrema_FuncExtCC::NbExt () const { return mySqDist.Length(); }
28
29 //=============================================================================
30
31 inline Standard_Real Extrema_FuncExtCC::SquareDistance (const Standard_Integer N) const
32 {
33   return mySqDist.Value(N);
34 }
35
36 //=============================================================================
37
38 inline Standard_Address Extrema_FuncExtCC::CurvePtr (const Standard_Integer theRank) const
39 {
40   Standard_OutOfRange_Raise_if (theRank < 1 || theRank > 2, "Extrema_FuncExtCC::SetCurve()")
41   return (theRank == 1 ? myC1 : myC2);
42 }
43
44 //=============================================================================
45
46 inline Standard_Real Extrema_FuncExtCC::Tolerance() const
47 {
48   return myTol;
49 }