0025622: CAST analysis: Avoid invocation of virtual Methods of the declared Class...
[occt.git] / src / HatchGen / HatchGen_IntersectionPoint.cxx
1 // Created on: 1994-03-18
2 // Created by: Jean Marc LACHAUME
3 // Copyright (c) 1994-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 <HatchGen_IntersectionPoint.ixx>
18
19 //=======================================================================
20 // Function : HatchGen_IntersectionPoint
21 // Purpose  : Constructor
22 //=======================================================================
23
24 HatchGen_IntersectionPoint::HatchGen_IntersectionPoint () :
25        myIndex  (0) ,
26        myParam  (RealLast()) ,
27        myPosit  (TopAbs_INTERNAL) ,
28        myBefore (TopAbs_UNKNOWN) ,
29        myAfter  (TopAbs_UNKNOWN) ,
30        mySegBeg (Standard_False) ,
31        mySegEnd (Standard_False)
32 {
33 }
34
35 //=======================================================================
36 // Function : ~HatchGen_IntersectionPoint
37 // Purpose  : Destructor
38 //=======================================================================
39
40 HatchGen_IntersectionPoint::~HatchGen_IntersectionPoint()
41 {
42 }
43
44
45 //=======================================================================
46 // Function : SetIndex
47 // Purpose  : Sets the index of the supporting curve.
48 //=======================================================================
49
50 void HatchGen_IntersectionPoint::SetIndex (const Standard_Integer Index)
51 {
52   myIndex = Index ;
53 }
54
55 //=======================================================================
56 // Function : Index
57 // Purpose  : Returns the index of the supporting curve.
58 //=======================================================================
59
60 Standard_Integer HatchGen_IntersectionPoint::Index () const
61 {
62   return myIndex ;
63 }
64
65 //=======================================================================
66 // Function : SetParameter
67 // Purpose  : Sets the parameter on the curve.
68 //=======================================================================
69
70 void HatchGen_IntersectionPoint::SetParameter (const Standard_Real Parameter)
71 {
72   myParam = Parameter ;
73 }
74
75 //=======================================================================
76 // Function : Parameter
77 // Purpose  : Returns the parameter on the curve.
78 //=======================================================================
79
80 Standard_Real HatchGen_IntersectionPoint::Parameter () const
81 {
82   return myParam ;
83 }
84
85 //=======================================================================
86 // Function : SetPosition
87 // Purpose  : Sets the position of the point on the curve.
88 //=======================================================================
89
90 void HatchGen_IntersectionPoint::SetPosition (const TopAbs_Orientation Position)
91 {
92   myPosit = Position ;
93 }
94
95 //=======================================================================
96 // Function : Position
97 // Purpose  : Returns the position of the point on the element.
98 //=======================================================================
99
100 TopAbs_Orientation HatchGen_IntersectionPoint::Position () const
101 {
102   return myPosit ;
103 }
104
105 //=======================================================================
106 // Function : SetStateBefore
107 // Purpose  : Sets the transition state before the intersection.
108 //=======================================================================
109
110 void HatchGen_IntersectionPoint::SetStateBefore (const TopAbs_State State)
111 {
112   myBefore = State ;
113 }
114
115 //=======================================================================
116 // Function : StateBefore
117 // Purpose  : Returns the transition state before the intersection.
118 //=======================================================================
119
120 TopAbs_State HatchGen_IntersectionPoint::StateBefore () const
121 {
122   return myBefore ;
123 }
124
125 //=======================================================================
126 // Function : SetStateAfter
127 // Purpose  : Sets the transition state after the intersection.
128 //=======================================================================
129
130 void HatchGen_IntersectionPoint::SetStateAfter (const TopAbs_State State)
131 {
132   myAfter = State ;
133 }
134
135 //=======================================================================
136 // Function : StateAfter
137 // Purpose  : Returns the transition state after the intersection.
138 //=======================================================================
139
140 TopAbs_State HatchGen_IntersectionPoint::StateAfter () const
141 {
142   return myAfter ;
143 }
144
145 //=======================================================================
146 // Function : SetSegmentBeginning
147 // Purpose  : Sets the flag that the point is the beginning of a segment.
148 //=======================================================================
149
150 void HatchGen_IntersectionPoint::SetSegmentBeginning (const Standard_Boolean State)
151 {
152   mySegBeg = State ;
153 }
154
155 //=======================================================================
156 // Function : SegmentBeginning
157 // Purpose  : Returns the flag that the point is the beginning of a
158 //            segment.
159 //=======================================================================
160
161 Standard_Boolean HatchGen_IntersectionPoint::SegmentBeginning () const
162 {
163   return mySegBeg ;
164 }
165
166 //=======================================================================
167 // Function : SetSegmentEnd
168 // Purpose  : Sets the flag that the point is the end of a segment.
169 //=======================================================================
170
171 void HatchGen_IntersectionPoint::SetSegmentEnd (const Standard_Boolean State)
172 {
173   mySegEnd = State ;
174 }
175
176 //=======================================================================
177 // Function : SegmentEnd
178 // Purpose  : Returns the flag that the point is the end of a segment.
179 //=======================================================================
180
181 Standard_Boolean HatchGen_IntersectionPoint::SegmentEnd () const
182 {
183   return mySegEnd ;
184 }