1 // Created on: 1993-09-23
2 // Created by: Didier PIFFAULT
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
22 #include <BRepMesh_Triangle.ixx>
24 BRepMesh_Triangle::BRepMesh_Triangle()
25 : Edge1(0), Edge2(0), Edge3(0), myMovability(BRepMesh_Free)
28 BRepMesh_Triangle::BRepMesh_Triangle (const Standard_Integer e1,
29 const Standard_Integer e2,
30 const Standard_Integer e3,
31 const Standard_Boolean o1,
32 const Standard_Boolean o2,
33 const Standard_Boolean o3,
34 const BRepMesh_DegreeOfFreedom canMove)
35 : Edge1(e1), Orientation1(o1),Edge2(e2), Orientation2(o2),
36 Edge3(e3), Orientation3(o3),
40 void BRepMesh_Triangle::Initialize(const Standard_Integer e1,
41 const Standard_Integer e2,
42 const Standard_Integer e3,
43 const Standard_Boolean o1,
44 const Standard_Boolean o2,
45 const Standard_Boolean o3,
46 const BRepMesh_DegreeOfFreedom canMove)
54 myMovability =canMove;
57 void BRepMesh_Triangle::Edges(Standard_Integer& e1,
62 Standard_Boolean& o3)const
72 void BRepMesh_Triangle::SetMovability(const BRepMesh_DegreeOfFreedom Move)
77 Standard_Integer BRepMesh_Triangle::HashCode
78 (const Standard_Integer Upper)const
80 return ::HashCode(Edge1+Edge2+Edge3, Upper);
83 Standard_Boolean BRepMesh_Triangle::IsEqual
84 (const BRepMesh_Triangle& Other)const
86 if (myMovability==BRepMesh_Deleted || Other.myMovability==BRepMesh_Deleted)
87 return Standard_False;
88 if (Edge1==Other.Edge1 && Edge2==Other.Edge2 && Edge3==Other.Edge3)
90 if (Edge1==Other.Edge2 && Edge2==Other.Edge3 && Edge3==Other.Edge1)
92 if (Edge1==Other.Edge3 && Edge2==Other.Edge1 && Edge3==Other.Edge2)
94 return Standard_False;