0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / IntPatch / IntPatch_RLine.lxx
1 // Created on: 1992-04-06
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22 #include <Standard_DomainError.hxx>
23 #include <IntSurf_LineOn2S.hxx>
24 #include <IntPatch_Point.hxx>
25
26
27 inline const Handle(Adaptor2d_HCurve2d)& IntPatch_RLine::ArcOnS1() const
28 {
29   return theArcOnS1;
30 }
31
32 inline const Handle(Adaptor2d_HCurve2d)& IntPatch_RLine::ArcOnS2() const
33 {
34   return theArcOnS2;
35 }
36
37 //-- Il faut mettre cet include ici , car l include fait un define Handle(Adaptor2d_HCurve2d) ...
38 //-- et en fin de fichier un undef Handle(Adaptor2d_HCurve2d) ... 
39
40 inline void IntPatch_RLine::AddVertex (const IntPatch_Point& Pnt)
41 {
42   svtx.Append(Pnt);
43 }
44
45 inline void IntPatch_RLine::Replace (const Standard_Integer Index,
46                                      const IntPatch_Point& Pnt)
47 {
48   svtx(Index) = Pnt;
49 }
50
51 inline void IntPatch_RLine::SetFirstPoint (const Standard_Integer IndFirst)
52 {
53   fipt = Standard_True;
54   indf = IndFirst;
55 }
56
57 inline void IntPatch_RLine::SetLastPoint (const Standard_Integer IndLast)
58 {
59   lapt = Standard_True;
60   indl = IndLast;
61 }
62
63 inline void IntPatch_RLine::Add(const Handle(IntSurf_LineOn2S)& L)
64 {
65   curv = L;
66 }
67
68 inline Standard_Boolean IntPatch_RLine::IsArcOnS1() const
69 {
70   return onS1;
71 }
72
73 inline Standard_Boolean IntPatch_RLine::IsArcOnS2() const
74 {
75   return onS2;
76 }
77
78 inline Standard_Boolean IntPatch_RLine::HasFirstPoint () const
79 {
80   return fipt;
81 }
82
83 inline Standard_Boolean IntPatch_RLine::HasLastPoint () const
84 {
85   return lapt;
86 }
87
88 inline const IntPatch_Point& IntPatch_RLine::FirstPoint () const
89 {
90   if (!fipt) {Standard_DomainError::Raise();}
91   return svtx(indf);
92 }
93
94 inline const IntPatch_Point& IntPatch_RLine::LastPoint () const
95 {
96   if (!lapt) {Standard_DomainError::Raise();}
97   return svtx(indl);
98 }
99
100 inline Standard_Integer IntPatch_RLine::NbVertex () const
101 {
102   return svtx.Length();
103 }
104
105 inline const IntPatch_Point& IntPatch_RLine::Vertex (const Standard_Integer Index) const
106 {
107   return svtx(Index);
108 }
109
110 inline Standard_Boolean IntPatch_RLine::HasPolygon () const
111 {
112   return (!curv.IsNull());
113 }
114
115 inline Standard_Integer IntPatch_RLine::NbPnts () const
116 {
117   if (curv.IsNull()) {Standard_DomainError::Raise();}
118   return curv->NbPoints();
119 }
120
121 inline const IntSurf_PntOn2S& IntPatch_RLine::Point (const Standard_Integer Index) const
122 {
123   if (curv.IsNull()) {Standard_DomainError::Raise();}
124   return curv->Value(Index);
125 }