blob: f8134b375ef7ca54b9ccbede06eff9df1ee09e77 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// File: BRepMesh_ComparatorOfIndexedVertexOfDelaun.cxx
// Created: Tue Apr 5 11:50:40 1994
// Author: Didier PIFFAULT
// <dpf@zerox>
#include <BRepMesh_ComparatorOfIndexedVertexOfDelaun.ixx>
#include <BRepMesh_Vertex.hxx>
//=======================================================================
//function : BRepMesh_ComparatorOfIndexedVertexOfDelaun
//purpose :
//=======================================================================
BRepMesh_ComparatorOfIndexedVertexOfDelaun::BRepMesh_ComparatorOfIndexedVertexOfDelaun
(const gp_XY& theDir,
const Standard_Real theTol,
const Handle(BRepMesh_DataStructureOfDelaun)& HDS)
: IndexedStructure(HDS),DirectionOfSort(theDir), Tolerance(theTol)
{}
//=======================================================================
//function : IsLower
//purpose :
//=======================================================================
Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsLower
(const Standard_Integer Left, const Standard_Integer Right) const
{
return ((IndexedStructure->GetNode(Left).Coord()*DirectionOfSort) <
(IndexedStructure->GetNode(Right).Coord()*DirectionOfSort));
}
//=======================================================================
//function : IsGreater
//purpose :
//=======================================================================
Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsGreater
(const Standard_Integer Left, const Standard_Integer Right) const
{
return ((IndexedStructure->GetNode(Left).Coord()*DirectionOfSort) >
(IndexedStructure->GetNode(Right).Coord()*DirectionOfSort));
}
//=======================================================================
//function : IsEqual
//purpose :
//=======================================================================
Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsEqual
(const Standard_Integer Left, const Standard_Integer Right) const
{
return (IndexedStructure->GetNode(Left).Coord().IsEqual
(IndexedStructure->GetNode(Right).Coord(), Tolerance));
}
|