]>
Commit | Line | Data |
---|---|---|
0d88155b O |
1 | // File: BRepMesh_ComparatorOfIndexedVertexOfDelaun.cxx |
2 | // Created: Tue Apr 5 11:50:40 1994 | |
3 | // Author: Didier PIFFAULT | |
4 | // <dpf@zerox> | |
5 | ||
6 | #include <BRepMesh_ComparatorOfIndexedVertexOfDelaun.ixx> | |
7 | #include <BRepMesh_Vertex.hxx> | |
8 | ||
9 | //======================================================================= | |
10 | //function : BRepMesh_ComparatorOfIndexedVertexOfDelaun | |
11 | //purpose : | |
12 | //======================================================================= | |
13 | ||
14 | BRepMesh_ComparatorOfIndexedVertexOfDelaun::BRepMesh_ComparatorOfIndexedVertexOfDelaun | |
15 | (const gp_XY& theDir, | |
16 | const Standard_Real theTol, | |
17 | const Handle(BRepMesh_DataStructureOfDelaun)& HDS) | |
18 | : IndexedStructure(HDS),DirectionOfSort(theDir), Tolerance(theTol) | |
19 | {} | |
20 | ||
21 | //======================================================================= | |
22 | //function : IsLower | |
23 | //purpose : | |
24 | //======================================================================= | |
25 | ||
26 | Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsLower | |
27 | (const Standard_Integer Left, const Standard_Integer Right) const | |
28 | { | |
29 | return ((IndexedStructure->GetNode(Left).Coord()*DirectionOfSort) < | |
30 | (IndexedStructure->GetNode(Right).Coord()*DirectionOfSort)); | |
31 | } | |
32 | ||
33 | //======================================================================= | |
34 | //function : IsGreater | |
35 | //purpose : | |
36 | //======================================================================= | |
37 | ||
38 | Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsGreater | |
39 | (const Standard_Integer Left, const Standard_Integer Right) const | |
40 | { | |
41 | return ((IndexedStructure->GetNode(Left).Coord()*DirectionOfSort) > | |
42 | (IndexedStructure->GetNode(Right).Coord()*DirectionOfSort)); | |
43 | } | |
44 | ||
45 | //======================================================================= | |
46 | //function : IsEqual | |
47 | //purpose : | |
48 | //======================================================================= | |
49 | ||
50 | Standard_Boolean BRepMesh_ComparatorOfIndexedVertexOfDelaun::IsEqual | |
51 | (const Standard_Integer Left, const Standard_Integer Right) const | |
52 | { | |
53 | return (IndexedStructure->GetNode(Left).Coord().IsEqual | |
54 | (IndexedStructure->GetNode(Right).Coord(), Tolerance)); | |
55 | } | |
56 |