Salome HOME
NRI : First integration.
[modules/smesh.git] / src / SMDS / SMDS_MeshQuadrangle.lxx
1 // File:        SMDS_MeshQuadrangle.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 : GetConnections
9 //purpose  : 
10 //           
11 //=======================================================================
12
13 inline Standard_Address SMDS_MeshQuadrangle::GetConnections() const
14 {
15   return (Standard_Address)&myNodes;
16 }
17
18 //=======================================================================
19 //function : GetConnection
20 //purpose  : 
21 //           
22 //=======================================================================
23
24 inline Standard_Integer SMDS_MeshQuadrangle::GetConnection(const Standard_Integer rank) const
25 {
26   return myNodes[rank-1];
27 }
28
29
30 //=======================================================================
31 //function : ComputeKey
32 //purpose  : compute the Key of the face based on the ids of its bounding nodes
33 //           
34 //=======================================================================
35
36 inline void SMDS_MeshQuadrangle::ComputeKey()
37 {
38   //  myKey = (myNodes[0] << 3) + (myNodes[1] << 2) + (myNodes[2] << 1) + myNodes[3];
39     myKey = myNodes[0]  + myNodes[1]  + myNodes[2]  + myNodes[3];
40 }
41
42 //=======================================================================
43 //function : GetEdgeDefinedByNodes
44 //purpose  : 
45 //=======================================================================
46 inline void SMDS_MeshQuadrangle::GetEdgeDefinedByNodes(const Standard_Integer rank, 
47                                                 Standard_Integer& idnode1,
48                                                 Standard_Integer& idnode2) const
49 {
50   idnode1 = myNodes[rank-1];
51   idnode2 = myNodes[rank % myNbNodes];
52 }
53