fe619d0e5f03d7ebaf7ba8c9c56bede3f5c9656a
[occt.git] / src / BRepMesh / BRepMesh_Edge.cxx
1 // File:        BRepMesh_Edge.cxx
2 // Created:     Thu Sep 23 13:39:58 1993
3 // Author:      Didier PIFFAULT
4 //              <dpf@zerox>
5   
6 #include <BRepMesh_Edge.ixx>
7   
8 BRepMesh_Edge::BRepMesh_Edge(const Standard_Integer vDebut,
9                              const Standard_Integer vFin,
10                              const MeshDS_DegreeOfFreedom canMove)
11      : myFirstNode(vDebut), myLastNode(vFin), myMovability(canMove)
12 {}
13
14 void  BRepMesh_Edge::SetMovability(const MeshDS_DegreeOfFreedom Move)
15 {
16   myMovability =Move;
17 }
18
19 Standard_Integer  BRepMesh_Edge::HashCode(const Standard_Integer Upper)const 
20 {
21   return ::HashCode(myFirstNode+myLastNode, Upper);
22 }
23
24 Standard_Boolean  BRepMesh_Edge::IsEqual(const BRepMesh_Edge& Other)const 
25 {
26   if (myMovability==MeshDS_Deleted || Other.myMovability==MeshDS_Deleted)
27     return Standard_False;
28   return (myFirstNode==Other.myFirstNode && myLastNode==Other.myLastNode) ||
29     (myFirstNode==Other.myLastNode && myLastNode==Other.myFirstNode);
30 }
31
32
33 Standard_Boolean  BRepMesh_Edge::SameOrientation
34   (const BRepMesh_Edge& Other)const 
35 {
36   return (myFirstNode==Other.myFirstNode && myLastNode==Other.myLastNode);
37 }