0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
[occt.git] / src / IntCurveSurface / IntCurveSurface_IntersectionPoint.cxx
1 // Created on: 1993-04-07
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1993-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
18 #include <gp_Pnt.hxx>
19 #include <IntCurveSurface_IntersectionPoint.hxx>
20
21 //================================================================================
22 IntCurveSurface_IntersectionPoint::IntCurveSurface_IntersectionPoint()
23 : myUSurf(0.0),
24   myVSurf(0.0),
25   myUCurv(0.0)
26 {
27 }
28 //================================================================================
29 IntCurveSurface_IntersectionPoint::IntCurveSurface_IntersectionPoint(const gp_Pnt& P,
30                                                                      const Standard_Real USurf,
31                                                                      const Standard_Real VSurf,
32                                                                      const Standard_Real UCurv,
33                                                                      const IntCurveSurface_TransitionOnCurve TrOnCurv):
34        myP(P),myUSurf(USurf),myVSurf(VSurf),myUCurv(UCurv),myTrOnCurv(TrOnCurv) 
35
36 }
37 //================================================================================
38 void IntCurveSurface_IntersectionPoint::SetValues(const gp_Pnt& P,
39                                                   const Standard_Real USurf,
40                                                   const Standard_Real VSurf,
41                                                   const Standard_Real UCurv,
42                                                   const IntCurveSurface_TransitionOnCurve TrOnCurv) { 
43   myP=P;
44   myUSurf=USurf;
45   myVSurf=VSurf;
46   myUCurv=UCurv;
47   myTrOnCurv=TrOnCurv;
48 }
49 //================================================================================
50 void IntCurveSurface_IntersectionPoint::Values(gp_Pnt& P,
51                                                Standard_Real& USurf,
52                                                Standard_Real& VSurf,
53                                                Standard_Real& UCurv,
54                                                IntCurveSurface_TransitionOnCurve& TrOnCurv) const 
55
56   P=myP;
57   USurf=myUSurf;
58   VSurf=myVSurf;
59   UCurv=myUCurv;
60   TrOnCurv=myTrOnCurv;
61 }
62 //================================================================================
63 void IntCurveSurface_IntersectionPoint::Dump() const { 
64   std::cout<<"IntersectionPoint: P("<<myP.X()<<","<<myP.Y()<<","<<myP.Z()<<")"<<std::endl;
65   std::cout<<"                 : USurf("<<myUSurf<<")  VSurf("<<myVSurf<<")   UCurve("<<myUCurv<<")"<<std::endl;
66   std::cout<<"                 : TransitionOnSurf ";
67
68   switch(myTrOnCurv) { 
69   case IntCurveSurface_Tangent: std::cout<<" Tangent "; break;
70   case IntCurveSurface_In: std::cout<<" In "; break;
71   case IntCurveSurface_Out: std::cout<<" Out "; break;
72
73   default: std::cout<< " XXXXX ";
74   }  
75   std::cout<<std::endl;
76 }
77
78
79