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