0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / Intf / Intf_InterferencePolygon2d.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-09-28
2// Created by: Didier PIFFAULT
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 _Intf_InterferencePolygon2d_HeaderFile
18#define _Intf_InterferencePolygon2d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26#include <Intf_Interference.hxx>
27class Standard_OutOfRange;
28class Intf_Polygon2d;
29class gp_Pnt2d;
30
31
32//! Computes the interference between two polygons or
33//! the self intersection of a polygon in two
34//! dimensions.
35class Intf_InterferencePolygon2d : public Intf_Interference
36{
37public:
38
39 DEFINE_STANDARD_ALLOC
40
41
42 //! Constructs an empty interference of Polygon.
43 Standard_EXPORT Intf_InterferencePolygon2d();
44
45 //! Constructs and computes an interference between two Polygons.
46 Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
47
48 //! Constructs and computes the auto interference of a Polygon.
49 Standard_EXPORT Intf_InterferencePolygon2d(const Intf_Polygon2d& Obje);
50
51 //! Computes an interference between two Polygons.
52 Standard_EXPORT void Perform (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
53
54 //! Computes the self interference of a Polygon.
55 Standard_EXPORT void Perform (const Intf_Polygon2d& Obje);
56
57 //! Gives the geometrical 2d point of the intersection
58 //! point at address <Index> in the interference.
59 Standard_EXPORT gp_Pnt2d Pnt2dValue (const Standard_Integer Index) const;
60
61
62
63
64protected:
65
66
67
68
69
70private:
71
72
73 Standard_EXPORT void Interference (const Intf_Polygon2d& Obje1, const Intf_Polygon2d& Obje2);
74
75 Standard_EXPORT void Interference (const Intf_Polygon2d& Obje);
76
77 Standard_EXPORT void Clean();
78
79 //! Computes the intersection between two segments
80 //! <BegO><EndO> et <BegT><EndT>.
81 Standard_EXPORT void Intersect (const Standard_Integer iO, const Standard_Integer iT, const gp_Pnt2d& BegO, const gp_Pnt2d& EndO, const gp_Pnt2d& BegT, const gp_Pnt2d& EndT);
82
83
84 Standard_Boolean oClos;
85 Standard_Boolean tClos;
86 Standard_Integer nbso;
87
88
89};
90
91
92
93
94
95
96
97#endif // _Intf_InterferencePolygon2d_HeaderFile