1 // File: SMDS_MeshElement.lxx
2 // Created: Thu Jan 24 09:45:40 2002
3 // Author: Jean-Michel BOULCOURT
4 // <jmb@coulox.paris1.matra-dtv.fr>
6 //=======================================================================
9 //=======================================================================
10 inline Standard_Integer SMDS_MeshElement::HashCode(const Standard_Integer Upper) const
12 return (GetKey() % Upper);
15 //=======================================================================
18 //=======================================================================
20 inline Standard_Boolean SMDS_MeshElement::IsEqual(const Handle(SMDS_MeshElement)& other) const
22 if (this->NbNodes()!=other->NbNodes())
23 return Standard_False;
24 Standard_Integer *c1,*c2;
25 Standard_Integer n = this->NbNodes();
27 c1 = (Standard_Integer *)this->GetConnections();
28 c2 = (Standard_Integer *)other->GetConnections();
30 return Standard_False;
36 for (;n--; c1++,c2++) {
38 return Standard_False;
46 //=======================================================================
49 //=======================================================================
51 inline Standard_Boolean SMDS_MeshElement::IsSame(const Handle(SMDS_MeshElement)& other) const
53 if (this->NbNodes()!=other->NbNodes())
54 return Standard_False;
55 Standard_Integer *c1,*c2;
56 Standard_Integer n = this->NbNodes();
58 c1 = (Standard_Integer *)this->GetConnections();
59 c2 = (Standard_Integer *)other->GetConnections();
61 return Standard_False;
67 Standard_Integer off = n-1;
69 for (;n--; c1++,c2++) {
70 if (*c1 != *c2 && *c1 != *(c2+off)) {
71 return Standard_False;
79 //=======================================================================
80 //function : IsNodeInElement
82 //=======================================================================
83 inline Standard_Boolean SMDS_MeshElement::IsNodeInElement(const Standard_Integer idnode) const
85 if (idnode < GetConnection(1))
86 return Standard_False;
89 c = (Standard_Integer *)this->GetConnections();
90 Standard_Integer n = myNbNodes;
97 return Standard_False;
101 //=======================================================================
105 //=======================================================================
107 inline Standard_Integer SMDS_MeshElement::NbNodes() const
112 //=======================================================================
115 //=======================================================================
116 inline Standard_Integer SMDS_MeshElement::GetID() const
121 //=======================================================================
124 //=======================================================================
125 inline SMDSAbs_ElementType SMDS_MeshElement::GetType() const