0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
[occt.git] / src / Extrema / Extrema_GenLocateExtPS.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-07-18
2// Created by: Modelistation
3// Copyright (c) 1995-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#ifndef _Extrema_GenLocateExtPS_HeaderFile
18#define _Extrema_GenLocateExtPS_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
42cf5bc1 22
23#include <Standard_Boolean.hxx>
24#include <Standard_Real.hxx>
25#include <Extrema_POnSurf.hxx>
26class Standard_DomainError;
27class StdFail_NotDone;
28class gp_Pnt;
29class Adaptor3d_Surface;
30class Extrema_POnSurf;
31
32
33//! With a close point, it calculates the distance
34//! between a point and a surface.
e5260e1d 35//! Criteria type is defined in "Perform" method.
42cf5bc1 36class Extrema_GenLocateExtPS
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
e5260e1d 42 //! Constructor.
43 Standard_EXPORT Extrema_GenLocateExtPS(const Adaptor3d_Surface& theS,
44 const Standard_Real theTolU = Precision::PConfusion(),
45 const Standard_Real theTolV = Precision::PConfusion());
42cf5bc1 46
e5260e1d 47 //! Calculates the extrema between the point and the surface using a close point.
48 //! The close point is defined by the parameter values theU0 and theV0.
49 //! Type of the algorithm depends on the isDistanceCriteria flag.
50 //! If flag value is false - normal projection criteria will be used.
51 //! If flag value is true - distance criteria will be used.
52 Standard_EXPORT void Perform(const gp_Pnt& theP,
53 const Standard_Real theU0,
54 const Standard_Real theV0,
55 const Standard_Boolean isDistanceCriteria = Standard_False);
42cf5bc1 56
57 //! Returns True if the distance is found.
58 Standard_EXPORT Standard_Boolean IsDone() const;
59
60 //! Returns the value of the extremum square distance.
61 Standard_EXPORT Standard_Real SquareDistance() const;
62
63 //! Returns the point of the extremum distance.
64 Standard_EXPORT const Extrema_POnSurf& Point() const;
65
42cf5bc1 66private:
67
e5260e1d 68 const Extrema_GenLocateExtPS& operator=(const Extrema_GenLocateExtPS&);
69 Extrema_GenLocateExtPS(const Extrema_GenLocateExtPS&);
42cf5bc1 70
e5260e1d 71 // Input.
72 const Adaptor3d_Surface& mySurf;
73 Standard_Real myTolU, myTolV;
42cf5bc1 74
e5260e1d 75 // State.
42cf5bc1 76 Standard_Boolean myDone;
e5260e1d 77
78 // Result.
42cf5bc1 79 Standard_Real mySqDist;
80 Extrema_POnSurf myPoint;
81
82
83};
84
85
86
87
88
89
90
91#endif // _Extrema_GenLocateExtPS_HeaderFile