Salome HOME
yfr : Merge with v1.2
[modules/smesh.git] / src / SMDS / SMDS_MeshEdge.lxx
1 // File:        SMDS_MeshEdge.lxx
2 // Created:     Thu Jan 24 17:06:47 2002
3 // Author:      Jean-Michel BOULCOURT
4 //              <jmb@coulox.paris1.matra-dtv.fr>
5
6
7 //=======================================================================
8 //function : ComputeKey
9 //purpose  : compute the Key of the edge based on the ids of its bounding nodes
10 //           
11 //=======================================================================
12
13 inline void SMDS_MeshEdge::ComputeKey()
14 {
15   //  myKey = (myNodes[0] << 2) + myNodes[1];
16    myKey = myNodes[0] + myNodes[1];
17 }
18
19 //=======================================================================
20 //function : GetKey
21 //purpose  : 
22 //           
23 //=======================================================================
24
25 inline Standard_Integer SMDS_MeshEdge::GetKey() const
26 {
27    return myKey;
28 }
29
30 //=======================================================================
31 //function : GetConnection
32 //purpose  : 
33 //           
34 //=======================================================================
35
36 inline Standard_Integer SMDS_MeshEdge::GetConnection(const Standard_Integer rank) const
37 {
38   return myNodes[rank-1];
39 }
40
41 //=======================================================================
42 //function : GetConnections
43 //purpose  : 
44 //           
45 //=======================================================================
46
47 inline Standard_Address SMDS_MeshEdge::GetConnections() const
48 {
49   return (Standard_Address)&myNodes;
50 }
51