0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / AdvApp2Var / AdvApp2Var_Network.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-04-10
2// Created by: Joelle CHAUVET
3// Copyright (c) 1996-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 _AdvApp2Var_Network_HeaderFile
18#define _AdvApp2Var_Network_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <AdvApp2Var_SequenceOfPatch.hxx>
25#include <TColStd_SequenceOfReal.hxx>
26#include <Standard_Boolean.hxx>
27#include <Standard_Integer.hxx>
28#include <Standard_Real.hxx>
29class Standard_NoSuchObject;
30class AdvApp2Var_Patch;
31
32
33
34class AdvApp2Var_Network
35{
36public:
37
38 DEFINE_STANDARD_ALLOC
39
40
41 Standard_EXPORT AdvApp2Var_Network();
42
43 Standard_EXPORT AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net, const TColStd_SequenceOfReal& TheU, const TColStd_SequenceOfReal& TheV);
44
45 //! search the Index of the first Patch not approximated,
46 //! if all Patches are approximated Standard_False is returned
47 Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& Index) const;
48
158f2931 49 AdvApp2Var_Patch& ChangePatch (const Standard_Integer Index) { return *myNet.Value(Index); }
50 AdvApp2Var_Patch& operator() (const Standard_Integer Index) { return ChangePatch(Index); }
42cf5bc1 51
52 Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue);
53
54 Standard_EXPORT void UpdateInV (const Standard_Real CuttingValue);
55
56 Standard_EXPORT void SameDegree (const Standard_Integer iu, const Standard_Integer iv, Standard_Integer& ncfu, Standard_Integer& ncfv);
57
58 Standard_EXPORT Standard_Integer NbPatch() const;
59
60 Standard_EXPORT Standard_Integer NbPatchInU() const;
61
62 Standard_EXPORT Standard_Integer NbPatchInV() const;
63
64 Standard_EXPORT Standard_Real UParameter (const Standard_Integer Index) const;
65
66 Standard_EXPORT Standard_Real VParameter (const Standard_Integer Index) const;
42cf5bc1 67
158f2931 68 const AdvApp2Var_Patch& Patch (const Standard_Integer UIndex, const Standard_Integer VIndex) const
69 {
70 return *myNet.Value ((VIndex-1)*(myUParameters.Length()-1) + UIndex);
71 }
42cf5bc1 72
158f2931 73 const AdvApp2Var_Patch& operator() (const Standard_Integer UIndex, const Standard_Integer VIndex) const
74 {
75 return Patch(UIndex,VIndex);
76 }
42cf5bc1 77
78private:
79
42cf5bc1 80 AdvApp2Var_SequenceOfPatch myNet;
81 TColStd_SequenceOfReal myUParameters;
82 TColStd_SequenceOfReal myVParameters;
83
42cf5bc1 84};
85
42cf5bc1 86#endif // _AdvApp2Var_Network_HeaderFile