summaryrefslogtreecommitdiff
path: root/inc/IntPoly_PntHasher.lxx
blob: 53b38238cc90942feb06eccea38824be385f7f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// File:	IntPoly_PntHasher.lxx
// Created:	Tue Aug  8 11:33:19 1995
// Author:	Stagiaire Alain JOURDAIN
//		<ajo@phobox>


#include <IntPoly_IndexedMapOfPnt.hxx>
#include <gp_Pnt.hxx>
#include <TColStd_MapRealHasher.hxx>
#include <Precision.hxx>

//=======================================================================
//function : HashCode
//purpose  : 
//=======================================================================

inline Standard_Integer IntPoly_PntHasher::HashCode(const gp_Pnt& Point,
						    const Standard_Integer upper)
{
  return TColStd_MapRealHasher::HashCode(Point.X()+Point.Y()+Point.Z(),upper);
}


//=======================================================================
//function : IsEqual
//purpose  : 
//=======================================================================

inline Standard_Boolean IntPoly_PntHasher::IsEqual(const gp_Pnt& Point1,
						   const gp_Pnt& Point2)
{
  return ((Point1.X() == Point2.X()) && 
	  (Point1.Y() == Point2.Y()) &&
	  (Point1.Z() == Point2.Z()));
}