0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / CSLib / CSLib_Class2d.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-03-08
2// Created by: Laurent BUCHARD
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 _CSLib_Class2d_HeaderFile
18#define _CSLib_Class2d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Address.hxx>
25#include <Standard_Real.hxx>
26#include <Standard_Integer.hxx>
27#include <TColgp_Array1OfPnt2d.hxx>
5fe14d0f 28#include <NCollection_Handle.hxx>
29#include <TColStd_Array1OfReal.hxx>
30#include <TColgp_SequenceOfPnt2d.hxx>
31
42cf5bc1 32class gp_Pnt2d;
33
34
35
36//! *** Class2d : Low level algorithm for 2d classification
37//! this class was moved from package BRepTopAdaptor
38class CSLib_Class2d
39{
40public:
41
42 DEFINE_STANDARD_ALLOC
43
44
5fe14d0f 45 //! Constructs the 2D-polygon.
46 //! thePnts2d is the set of the vertices (closed polygon
47 //! will always be created inside of this constructor;
48 //! consequently, there is no point in repeating first and
49 //! last point in thePnts2d).
50 //! theTolu and theTolv are tolerances.
51 //! theUmin, theVmin, theUmax, theVmax are
52 //! UV-bounds of the polygon.
53 Standard_EXPORT CSLib_Class2d(const TColgp_Array1OfPnt2d& thePnts2d,
54 const Standard_Real theTolU,
55 const Standard_Real theTolV,
56 const Standard_Real theUMin,
57 const Standard_Real theVMin,
58 const Standard_Real theUMax,
59 const Standard_Real theVMax);
60
61 //! Constructs the 2D-polygon.
62 //! thePnts2d is the set of the vertices (closed polygon
63 //! will always be created inside of this constructor;
64 //! consequently, there is no point in repeating first and
65 //! last point in thePnts2d).
66 //! theTolu and theTolv are tolerances.
67 //! theUmin, theVmin, theUmax, theVmax are
68 //! UV-bounds of the polygon.
69 Standard_EXPORT CSLib_Class2d(const TColgp_SequenceOfPnt2d& thePnts2d,
70 const Standard_Real theTolU,
71 const Standard_Real theTolV,
72 const Standard_Real theUMin,
73 const Standard_Real theVMin,
74 const Standard_Real theUMax,
75 const Standard_Real theVMax);
76
42cf5bc1 77 Standard_EXPORT Standard_Integer SiDans (const gp_Pnt2d& P) const;
78
79 Standard_EXPORT Standard_Integer SiDans_OnMode (const gp_Pnt2d& P, const Standard_Real Tol) const;
80
81 Standard_EXPORT Standard_Integer InternalSiDans (const Standard_Real X, const Standard_Real Y) const;
82
83 Standard_EXPORT Standard_Integer InternalSiDansOuOn (const Standard_Real X, const Standard_Real Y) const;
84
42cf5bc1 85protected:
86
87
42cf5bc1 88private:
89
5fe14d0f 90 //! Initializes theObj
91 template <class TCol_Containers2d>
92 void Init(const TCol_Containers2d& TP2d,
93 const Standard_Real aTolu,
94 const Standard_Real aTolv,
95 const Standard_Real umin,
96 const Standard_Real vmin,
97 const Standard_Real umax,
98 const Standard_Real vmax);
42cf5bc1 99
5fe14d0f 100 //! Assign operator is forbidden
101 const CSLib_Class2d& operator= (const CSLib_Class2d& Other) const;
42cf5bc1 102
5fe14d0f 103 NCollection_Handle <TColStd_Array1OfReal> MyPnts2dX, MyPnts2dY;
42cf5bc1 104 Standard_Real Tolu;
105 Standard_Real Tolv;
106 Standard_Integer N;
107 Standard_Real Umin;
108 Standard_Real Vmin;
109 Standard_Real Umax;
110 Standard_Real Vmax;
111
112
113};
114
115
116
117
118
119
120
121#endif // _CSLib_Class2d_HeaderFile