7fd59977 |
1 | // File: IntPoly_Pnt2dHasher.lxx |
2 | // Created: Thu Jul 20 10:20:04 1995 |
3 | // Author: Stagiaire Alain JOURDAIN |
4 | // <ajo@phobox> |
5 | |
6 | #include <IntPoly_IndexedMapOfPnt2d.hxx> |
7 | #include <gp_Pnt2d.hxx> |
8 | #include <TColStd_MapRealHasher.hxx> |
9 | #include <Precision.hxx> |
10 | |
11 | //======================================================================= |
12 | //function : HashCode |
13 | //purpose : |
14 | //======================================================================= |
15 | |
16 | inline Standard_Integer IntPoly_Pnt2dHasher::HashCode(const gp_Pnt2d& Point, |
17 | const Standard_Integer upper) |
18 | { |
19 | return TColStd_MapRealHasher::HashCode(Point.X()+Point.Y(),upper); |
20 | } |
21 | |
22 | |
23 | //======================================================================= |
24 | //function : IsEqual |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | inline Standard_Boolean IntPoly_Pnt2dHasher::IsEqual(const gp_Pnt2d& Point1, |
29 | const gp_Pnt2d& Point2) |
30 | { |
31 | return ((Point1.X() == Point2.X()) && (Point1.Y() == Point2.Y())); |
32 | } |