0024236: Eliminate GCC compiler warning (uninitialized variables)
[occt.git] / src / ChFiDS / ChFiDS_CommonPoint.lxx
1 // Created on: 1993-11-30
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1993-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
23 //=======================================================================
24 //function : SetVertex
25 //purpose  : 
26 //=======================================================================
27
28 inline void  ChFiDS_CommonPoint::SetVertex(const TopoDS_Vertex& V)
29 {
30   isvtx = Standard_True;
31   vtx = V;
32 }
33
34
35 //=======================================================================
36 //function : SetPoint
37 //purpose  : 
38 //=======================================================================
39
40  inline void  ChFiDS_CommonPoint::SetPoint(const gp_Pnt& Point)
41 {
42   point = Point;
43 }
44
45 //=======================================================================
46 //function : SetVector
47 //purpose  : 
48 //=======================================================================
49
50  inline void  ChFiDS_CommonPoint::SetVector(const gp_Vec& Vector)
51 {
52   hasvector = Standard_True;
53   vector = Vector;
54 }
55
56 //=======================================================================
57 //function : SetTolerance
58 //purpose  : 
59 // PMN : 30/09/1997 : On se contente d'updater la tolerance.
60 //=======================================================================
61
62  inline void  ChFiDS_CommonPoint::SetTolerance(const Standard_Real Tol)
63 {
64   if (Tol>tol) tol = Tol;
65 }
66
67
68 //=======================================================================
69 //function : Tolerance
70 //purpose  : 
71 //=======================================================================
72
73  inline Standard_Real  ChFiDS_CommonPoint::Tolerance()const 
74 {
75   return tol;
76 }
77
78
79 //=======================================================================
80 //function : IsVertex
81 //purpose  : 
82 //=======================================================================
83
84  inline Standard_Boolean  ChFiDS_CommonPoint::IsVertex()const 
85 {
86   return isvtx;
87 }
88
89
90 //=======================================================================
91 //function : Vertex
92 //purpose  : 
93 //=======================================================================
94
95  inline const TopoDS_Vertex&  ChFiDS_CommonPoint::Vertex()const 
96 {
97   if (!isvtx) {Standard_DomainError::Raise();}
98   return vtx;
99 }
100
101 //=======================================================================
102 //function : Point
103 //purpose  : 
104 //=======================================================================
105
106  inline const gp_Pnt&  ChFiDS_CommonPoint::Point()const 
107 {
108   return point;
109 }
110
111 //=======================================================================
112 //function : HasVector
113 //purpose  : 
114 //=======================================================================
115
116  inline Standard_Boolean  ChFiDS_CommonPoint::HasVector()const 
117 {
118   return hasvector;
119 }
120
121 //=======================================================================
122 //function : Vector
123 //purpose  : 
124 //=======================================================================
125
126  inline const gp_Vec&  ChFiDS_CommonPoint::Vector()const 
127 {
128   if (!hasvector) {
129     Standard_DomainError::Raise("ChFiDS_CommonPoint::Vector");
130   }
131   return vector;
132 }
133
134 //=======================================================================
135 //function : IsOnArc
136 //purpose  : 
137 //=======================================================================
138
139  inline Standard_Boolean  ChFiDS_CommonPoint::IsOnArc()const 
140 {
141   return isonarc;
142 }
143
144
145
146