0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / HatchGen / HatchGen_PointOnHatching.hxx
1 // Created on: 1993-10-29
2 // Created by: Jean Marc LACHAUME
3 // Copyright (c) 1993-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 _HatchGen_PointOnHatching_HeaderFile
18 #define _HatchGen_PointOnHatching_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <HatchGen_PointsOnElement.hxx>
25 #include <HatchGen_IntersectionPoint.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Standard_Boolean.hxx>
29 class Standard_OutOfRange;
30 class IntRes2d_IntersectionPoint;
31 class HatchGen_PointOnElement;
32
33
34
35 class HatchGen_PointOnHatching  : public HatchGen_IntersectionPoint
36 {
37 public:
38
39   DEFINE_STANDARD_ALLOC
40
41   
42   //! Creates an empty point.
43   Standard_EXPORT HatchGen_PointOnHatching();
44   
45   //! Creates a point from an other.
46   Standard_EXPORT HatchGen_PointOnHatching(const HatchGen_PointOnHatching& Point);
47   
48   //! Creates a point from an intersection point.
49   Standard_EXPORT HatchGen_PointOnHatching(const IntRes2d_IntersectionPoint& Point);
50   
51   //! Adds a point on element to the point.
52   Standard_EXPORT void AddPoint (const HatchGen_PointOnElement& Point, const Standard_Real Confusion);
53   
54   //! Returns the number of elements intersecting the
55   //! hatching at this point.
56   Standard_EXPORT Standard_Integer NbPoints() const;
57   
58   //! Returns the Index-th point on element of the point.
59   //! The exception OutOfRange is raised if
60   //! Index > NbPoints.
61   Standard_EXPORT const HatchGen_PointOnElement& Point (const Standard_Integer Index) const;
62   
63   //! Removes the Index-th point on element of the point.
64   //! The exception OutOfRange is raised if
65   //! Index > NbPoints.
66   Standard_EXPORT void RemPoint (const Standard_Integer Index);
67   
68   //! Removes all the points on element of the point.
69   Standard_EXPORT void ClrPoints();
70   
71   //! Tests if the point is lower than an other.
72   //! A point on hatching P1 is said to be lower than an
73   //! other P2 if :
74   //! P2.myParam - P1.myParam > Confusion
75   Standard_EXPORT Standard_Boolean IsLower (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
76   
77   //! Tests if the  point is equal to an other.
78   //! A  point on hatching P1 is said to be equal to an
79   //! other P2 if :
80   //! | P2.myParam - P1.myParam | <= Confusion
81   Standard_EXPORT Standard_Boolean IsEqual (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
82   
83   //! Tests if the point is greater than an other.
84   //! A point on hatching P1 is said to be greater than an
85   //! other P2 if :
86   //! P1.myParam - P2.myParam > Confusion
87   Standard_EXPORT Standard_Boolean IsGreater (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
88   
89   //! Dump of the point.
90   Standard_EXPORT void Dump (const Standard_Integer Index = 0) const;
91
92
93
94
95 protected:
96
97
98
99   HatchGen_PointsOnElement myPoints;
100
101
102 private:
103
104
105
106
107
108 };
109
110
111
112
113
114
115
116 #endif // _HatchGen_PointOnHatching_HeaderFile