0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / HLRBRep / HLRBRep_ThePolyhedronOfInterCSurf.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-10-14
2// Created by: Christophe MARION
3// Copyright (c) 1992-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 _HLRBRep_ThePolyhedronOfInterCSurf_HeaderFile
18#define _HLRBRep_ThePolyhedronOfInterCSurf_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Integer.hxx>
25#include <Bnd_Box.hxx>
26#include <Bnd_HArray1OfBox.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Address.hxx>
29#include <Standard_Boolean.hxx>
30#include <TColStd_Array1OfReal.hxx>
31class Standard_OutOfRange;
32class HLRBRep_SurfaceTool;
33class gp_Pnt;
34class Bnd_Box;
35class gp_XYZ;
36
37
38
39class HLRBRep_ThePolyhedronOfInterCSurf
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 Standard_EXPORT HLRBRep_ThePolyhedronOfInterCSurf(const Standard_Address& Surface, const Standard_Integer nbdU, const Standard_Integer nbdV, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
47
48 Standard_EXPORT HLRBRep_ThePolyhedronOfInterCSurf(const Standard_Address& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars);
49
50 Standard_EXPORT void Destroy();
51~HLRBRep_ThePolyhedronOfInterCSurf()
52{
53 Destroy();
54}
55
56 Standard_EXPORT void DeflectionOverEstimation (const Standard_Real flec);
57
58 Standard_EXPORT Standard_Real DeflectionOnTriangle (const Standard_Address& Surface, const Standard_Integer Index) const;
59
60 Standard_EXPORT void UMinSingularity (const Standard_Boolean Sing);
61
62 Standard_EXPORT void UMaxSingularity (const Standard_Boolean Sing);
63
64 Standard_EXPORT void VMinSingularity (const Standard_Boolean Sing);
65
66 Standard_EXPORT void VMaxSingularity (const Standard_Boolean Sing);
67
36b9ff75 68 //! get the size of the discretization.
42cf5bc1 69 Standard_EXPORT void Size (Standard_Integer& nbdu, Standard_Integer& nbdv) const;
70
36b9ff75 71 //! Give the number of triangles in this double array of
42cf5bc1 72 Standard_EXPORT Standard_Integer NbTriangles() const;
73
36b9ff75 74 //! Give the 3 points of the triangle of addresse Index in
75 //! the double array of triangles.
42cf5bc1 76 Standard_EXPORT void Triangle (const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3) const;
77
36b9ff75 78 //! Give the addresse Tricon of the triangle connexe to the
79 //! triangle of address Triang by the edge Pivot Pedge and
80 //! the third point of this connexe triangle. When we are
81 //! on a free edge TriCon==0 but the function return the
82 //! value of the triangle in the other side of Pivot on
83 //! the free edge. Used to turn around a vertex.
42cf5bc1 84 Standard_EXPORT Standard_Integer TriConnex (const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP) const;
85
36b9ff75 86 //! Give the number of point in the double array of
87 //! triangles ((nbdu+1)*(nbdv+1)).
42cf5bc1 88 Standard_EXPORT Standard_Integer NbPoints() const;
89
36b9ff75 90 //! Set the value of a field of the double array of
91 //! points.
42cf5bc1 92 Standard_EXPORT void Point (const gp_Pnt& thePnt, const Standard_Integer lig, const Standard_Integer col, const Standard_Real U, const Standard_Real V);
93
36b9ff75 94 //! Give the point of index i in the MaTriangle.
42cf5bc1 95 Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
96
36b9ff75 97 //! Give the point of index i in the MaTriangle.
42cf5bc1 98 Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index) const;
99
36b9ff75 100 //! Give the point of index i in the MaTriangle.
42cf5bc1 101 Standard_EXPORT void Point (const Standard_Integer Index, gp_Pnt& P) const;
102
36b9ff75 103 //! Give the bounding box of the MaTriangle.
42cf5bc1 104 Standard_EXPORT const Bnd_Box& Bounding() const;
105
36b9ff75 106 //! Compute the array of boxes. The box <n> corresponding
107 //! to the triangle <n>.
42cf5bc1 108 Standard_EXPORT void FillBounding();
109
36b9ff75 110 //! Give the array of boxes. The box <n> corresponding
111 //! to the triangle <n>.
42cf5bc1 112 Standard_EXPORT const Handle(Bnd_HArray1OfBox)& ComponentsBounding() const;
113
114 Standard_EXPORT Standard_Real DeflectionOverEstimation() const;
115
116 Standard_EXPORT Standard_Boolean HasUMinSingularity() const;
117
118 Standard_EXPORT Standard_Boolean HasUMaxSingularity() const;
119
120 Standard_EXPORT Standard_Boolean HasVMinSingularity() const;
121
122 Standard_EXPORT Standard_Boolean HasVMaxSingularity() const;
123
36b9ff75 124 //! Give the plane equation of the triangle of addresse Triang.
42cf5bc1 125 Standard_EXPORT void PlaneEquation (const Standard_Integer Triang, gp_XYZ& NormalVector, Standard_Real& PolarDistance) const;
126
36b9ff75 127 //! Give the plane equation of the triangle of addresse Triang.
42cf5bc1 128 Standard_EXPORT Standard_Boolean Contain (const Standard_Integer Triang, const gp_Pnt& ThePnt) const;
129
130 Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
131
36b9ff75 132 //! This method returns true if the edge based on points with
133 //! indices Index1 and Index2 represents a boundary edge. It is
134 //! necessary to take into account the boundary deflection for
135 //! this edge.
42cf5bc1 136 Standard_EXPORT Standard_Boolean IsOnBound (const Standard_Integer Index1, const Standard_Integer Index2) const;
137
36b9ff75 138 //! This method returns a border deflection.
42cf5bc1 139 Standard_Real GetBorderDeflection() const;
140
141 Standard_EXPORT void Dump() const;
142
143
144
145
146protected:
147
148
149 Standard_EXPORT void Init (const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
150
151 Standard_EXPORT void Init (const Standard_Address& Surface, const TColStd_Array1OfReal& Upars, const TColStd_Array1OfReal& Vpars);
152
153
154
155
156private:
157
158
36b9ff75 159 //! This method computes and returns a deflection of isoline
160 //! of given parameter on Surface.
42cf5bc1 161 Standard_EXPORT Standard_Real ComputeBorderDeflection (const Standard_Address& Surface, const Standard_Real Parameter, const Standard_Real PMin, const Standard_Real PMax, const Standard_Boolean isUIso) const;
162
163
164 Standard_Integer nbdeltaU;
165 Standard_Integer nbdeltaV;
166 Bnd_Box TheBnd;
167 Handle(Bnd_HArray1OfBox) TheComponentsBnd;
168 Standard_Real TheDeflection;
169 Standard_Address C_MyPnts;
170 Standard_Address C_MyU;
171 Standard_Address C_MyV;
172 Standard_Boolean UMinSingular;
173 Standard_Boolean UMaxSingular;
174 Standard_Boolean VMinSingular;
175 Standard_Boolean VMaxSingular;
176 Standard_Real TheBorderDeflection;
177 Standard_Address C_MyIsOnBounds;
178
179
180};
181
182#define ThePSurface Standard_Address
183#define ThePSurface_hxx <Standard_Address.hxx>
184#define ThePSurfaceTool HLRBRep_SurfaceTool
185#define ThePSurfaceTool_hxx <HLRBRep_SurfaceTool.hxx>
186#define IntCurveSurface_Polyhedron HLRBRep_ThePolyhedronOfInterCSurf
187#define IntCurveSurface_Polyhedron_hxx <HLRBRep_ThePolyhedronOfInterCSurf.hxx>
188
189#include <IntCurveSurface_Polyhedron.lxx>
190
191#undef ThePSurface
192#undef ThePSurface_hxx
193#undef ThePSurfaceTool
194#undef ThePSurfaceTool_hxx
195#undef IntCurveSurface_Polyhedron
196#undef IntCurveSurface_Polyhedron_hxx
197
198
199
200
201#endif // _HLRBRep_ThePolyhedronOfInterCSurf_HeaderFile