0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / Law / Law_Interpol.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-02-03
2// Created by: Laurent BOURESCHE
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 _Law_Interpol_HeaderFile
18#define _Law_Interpol_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Law_BSpFunc.hxx>
24#include <TColgp_Array1OfPnt2d.hxx>
25#include <Standard_Boolean.hxx>
26#include <Standard_Real.hxx>
27
28
29class Law_Interpol;
30DEFINE_STANDARD_HANDLE(Law_Interpol, Law_BSpFunc)
31
32//! Provides an evolution law that interpolates a set
33//! of parameter and value pairs (wi, radi)
34class Law_Interpol : public Law_BSpFunc
35{
36
37public:
38
39
40 //! Constructs an empty interpolative evolution law.
41 //! The function Set is used to define the law.
42 Standard_EXPORT Law_Interpol();
43
44
45 //! Defines this evolution law by interpolating the set of 2D
46 //! points ParAndRad. The Y coordinate of a point of
47 //! ParAndRad is the value of the function at the parameter
48 //! point given by its X coordinate.
49 //! If Periodic is true, this function is assumed to be periodic.
50 //! Warning
51 //! - The X coordinates of points in the table ParAndRad
52 //! must be given in ascendant order.
53 //! - If Periodic is true, the first and last Y coordinates of
54 //! points in the table ParAndRad are assumed to be
55 //! equal. In addition, with the second syntax, Dd and Df
56 //! are also assumed to be equal. If this is not the case,
57 //! Set uses the first value(s) as last value(s).
58 Standard_EXPORT void Set (const TColgp_Array1OfPnt2d& ParAndRad, const Standard_Boolean Periodic = Standard_False);
59
60 Standard_EXPORT void SetInRelative (const TColgp_Array1OfPnt2d& ParAndRad, const Standard_Real Ud, const Standard_Real Uf, const Standard_Boolean Periodic = Standard_False);
61
62
63 //! Defines this evolution law by interpolating the set of 2D
64 //! points ParAndRad. The Y coordinate of a point of
65 //! ParAndRad is the value of the function at the parameter
66 //! point given by its X coordinate.
67 //! If Periodic is true, this function is assumed to be periodic.
68 //! In the second syntax, Dd and Df define the values of
69 //! the first derivative of the function at its first and last points.
70 //! Warning
71 //! - The X coordinates of points in the table ParAndRad
72 //! must be given in ascendant order.
73 //! - If Periodic is true, the first and last Y coordinates of
74 //! points in the table ParAndRad are assumed to be
75 //! equal. In addition, with the second syntax, Dd and Df
76 //! are also assumed to be equal. If this is not the case,
77 //! Set uses the first value(s) as last value(s).
78 Standard_EXPORT void Set (const TColgp_Array1OfPnt2d& ParAndRad, const Standard_Real Dd, const Standard_Real Df, const Standard_Boolean Periodic = Standard_False);
79
80 Standard_EXPORT void SetInRelative (const TColgp_Array1OfPnt2d& ParAndRad, const Standard_Real Ud, const Standard_Real Uf, const Standard_Real Dd, const Standard_Real Df, const Standard_Boolean Periodic = Standard_False);
81
82
83
84
92efcf78 85 DEFINE_STANDARD_RTTIEXT(Law_Interpol,Law_BSpFunc)
42cf5bc1 86
87protected:
88
89
90
91
92private:
93
94
95
96
97};
98
99
100
101
102
103
104
105#endif // _Law_Interpol_HeaderFile