0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / BRepMesh / BRepMesh_EdgeParameterProvider.hxx
CommitLineData
ceb418e1 1// Created on: 2014-08-13
2// Created by: Oleg AGASHIN
3// Copyright (c) 2011-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _BRepMesh_EdgeParameterProvider_HeaderFile
17#define _BRepMesh_EdgeParameterProvider_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_DefineAlloc.hxx>
21#include <Extrema_LocateExtPC.hxx>
b7c077b9 22#include <TColStd_HArray1OfReal.hxx>
51aed730 23#include <BRepAdaptor_Curve.hxx>
ceb418e1 24
25class gp_Pnt;
26class TopoDS_Edge;
27class TopoDS_Face;
92efcf78 28#include <TColStd_HArray1OfReal.hxx>
ceb418e1 29
30//! Auxiliary class provides correct parameters
31//! on curve regarding SameParameter flag.
32class BRepMesh_EdgeParameterProvider
33{
34public:
35
36 DEFINE_STANDARD_ALLOC
37
38 //! Constructor.
39 //! @param theEdge edge which parameters should be processed.
40 //! @param theFace face the parametric values are defined for.
41 //! @param theParameters parameters corresponded to discretization points.
42 BRepMesh_EdgeParameterProvider(
43 const TopoDS_Edge& theEdge,
44 const TopoDS_Face& theFace,
45 const Handle(TColStd_HArray1OfReal)& theParameters);
46
47 //! Returns parameter according to SameParameter flag of the edge.
48 //! If SameParameter is TRUE returns value from parameters w/o changes,
49 //! elsewhere scales initial parameter and tries to determine resulting
50 //! value using projection of the corresponded 3D point on PCurve.
51 Standard_Real Parameter(const Standard_Integer theIndex,
52 const gp_Pnt& thePoint3d);
53
54private:
55
56 Handle(TColStd_HArray1OfReal) myParameters;
57
58 Standard_Boolean myIsSameParam;
59 Standard_Real myFirstParam;
60
61 Standard_Real myOldFirstParam;
62 Standard_Real myScale;
63
64 Standard_Real myCurParam;
65 Standard_Real myFoundParam;
66
51aed730 67 BRepAdaptor_Curve myCurveAdaptor;
ceb418e1 68 Extrema_LocateExtPC myProjector;
69};
70
71#endif