0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / GeomFill / GeomFill_CoonsAlgPatch.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-12-04
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 _GeomFill_CoonsAlgPatch_HeaderFile
18#define _GeomFill_CoonsAlgPatch_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <gp_Pnt.hxx>
25e59720 24#include <Standard_Transient.hxx>
42cf5bc1 25#include <Standard_Real.hxx>
26#include <Standard_Integer.hxx>
27class GeomFill_Boundary;
28class Law_Function;
29class gp_Pnt;
30class gp_Vec;
31
32
33class GeomFill_CoonsAlgPatch;
25e59720 34DEFINE_STANDARD_HANDLE(GeomFill_CoonsAlgPatch, Standard_Transient)
42cf5bc1 35
36//! Provides evaluation methods on an algorithmic
37//! patch (based on 4 Curves) defined by its boundaries and blending
38//! functions.
25e59720 39class GeomFill_CoonsAlgPatch : public Standard_Transient
42cf5bc1 40{
41
42public:
43
44
45 //! Constructs the algorithmic patch. By Default the
46 //! constructed blending functions are linear.
47 //! Warning: No control is done on the bounds.
48 //! B1/B3 and B2/B4 must be same range and well oriented.
49 Standard_EXPORT GeomFill_CoonsAlgPatch(const Handle(GeomFill_Boundary)& B1, const Handle(GeomFill_Boundary)& B2, const Handle(GeomFill_Boundary)& B3, const Handle(GeomFill_Boundary)& B4);
50
51 //! Give the blending functions.
52 Standard_EXPORT void Func (Handle(Law_Function)& f1, Handle(Law_Function)& f2) const;
53
54 //! Set the blending functions.
55 Standard_EXPORT void SetFunc (const Handle(Law_Function)& f1, const Handle(Law_Function)& f2);
56
57 //! Computes the value on the algorithmic patch at
58 //! parameters U and V.
59 Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
60
61 //! Computes the d/dU partial derivative on the
62 //! algorithmic patch at parameters U and V.
63 Standard_EXPORT gp_Vec D1U (const Standard_Real U, const Standard_Real V) const;
64
65 //! Computes the d/dV partial derivative on the
66 //! algorithmic patch at parameters U and V.
67 Standard_EXPORT gp_Vec D1V (const Standard_Real U, const Standard_Real V) const;
68
69 //! Computes the d2/dUdV partial derivative on the
70 //! algorithmic patch made with linear blending functions
71 //! at parameter U and V.
72 Standard_EXPORT gp_Vec DUV (const Standard_Real U, const Standard_Real V) const;
73
74 Standard_EXPORT const gp_Pnt& Corner (const Standard_Integer I) const;
75
76 Standard_EXPORT const Handle(GeomFill_Boundary)& Bound (const Standard_Integer I) const;
77
78 Standard_EXPORT const Handle(Law_Function)& Func (const Standard_Integer I) const;
79
80
81
82
25e59720 83 DEFINE_STANDARD_RTTIEXT(GeomFill_CoonsAlgPatch,Standard_Transient)
42cf5bc1 84
85protected:
86
87
88
89
90private:
91
92
93 Handle(GeomFill_Boundary) bound[4];
94 gp_Pnt c[4];
95 Handle(Law_Function) a[2];
96
97
98};
99
100
101
102
103
104
105
106#endif // _GeomFill_CoonsAlgPatch_HeaderFile