42cf5bc1 |
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_PointOnElement_HeaderFile |
18 | #define _HatchGen_PointOnElement_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <HatchGen_IntersectionType.hxx> |
25 | #include <HatchGen_IntersectionPoint.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <Standard_Real.hxx> |
28 | #include <Standard_Integer.hxx> |
29 | class IntRes2d_IntersectionPoint; |
30 | |
31 | |
32 | |
33 | class HatchGen_PointOnElement : public HatchGen_IntersectionPoint |
34 | { |
35 | public: |
36 | |
37 | DEFINE_STANDARD_ALLOC |
38 | |
39 | |
40 | //! ---Purpose; Creates an empty point on element |
41 | Standard_EXPORT HatchGen_PointOnElement(); |
42 | |
43 | //! Creates a point from an other. |
44 | Standard_EXPORT HatchGen_PointOnElement(const HatchGen_PointOnElement& Point); |
45 | |
46 | //! Creates a point from an intersection point. |
47 | Standard_EXPORT HatchGen_PointOnElement(const IntRes2d_IntersectionPoint& Point); |
48 | |
49 | //! Sets the intersection type at this point. |
50 | void SetIntersectionType (const HatchGen_IntersectionType Type); |
51 | |
52 | //! Returns the intersection type at this point. |
53 | HatchGen_IntersectionType IntersectionType() const; |
54 | |
55 | //! Tests if the point is identical to an other. |
56 | //! That is to say : |
57 | //! P1.myIndex = P2.myIndex |
58 | //! Abs (P1.myParam - P2.myParam) <= Confusion |
59 | //! P1.myPosit = P2.myPosit |
60 | //! P1.myBefore = P2.myBefore |
61 | //! P1.myAfter = P2.myAfter |
62 | //! P1.mySegBeg = P2.mySegBeg |
63 | //! P1.mySegEnd = P2.mySegEnd |
64 | //! P1.myType = P2.myType |
65 | Standard_EXPORT Standard_Boolean IsIdentical (const HatchGen_PointOnElement& Point, const Standard_Real Confusion) const; |
66 | |
67 | //! Tests if the point is different from an other. |
68 | Standard_EXPORT Standard_Boolean IsDifferent (const HatchGen_PointOnElement& Point, const Standard_Real Confusion) const; |
69 | |
70 | //! Dump of the point on element. |
71 | Standard_EXPORT void Dump (const Standard_Integer Index = 0) const; |
72 | |
73 | |
74 | |
75 | |
76 | protected: |
77 | |
78 | |
79 | |
80 | HatchGen_IntersectionType myType; |
81 | |
82 | |
83 | private: |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | }; |
90 | |
91 | |
92 | #include <HatchGen_PointOnElement.lxx> |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | #endif // _HatchGen_PointOnElement_HeaderFile |