1 // Created on: 1993-09-23
2 // Created by: Didier PIFFAULT
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepMesh_Triangle_HeaderFile
18 #define _BRepMesh_Triangle_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Macro.hxx>
24 #include <BRepMesh_DegreeOfFreedom.hxx>
26 class BRepMesh_Triangle {
32 Standard_EXPORT BRepMesh_Triangle();
34 Standard_EXPORT BRepMesh_Triangle(const Standard_Integer theEdge1,
35 const Standard_Integer theEdge2,
36 const Standard_Integer theEdge3,
37 const Standard_Boolean theOrientation1,
38 const Standard_Boolean theOrientation2,
39 const Standard_Boolean theOrientation3,
40 const BRepMesh_DegreeOfFreedom isCanMove);
42 Standard_EXPORT void Initialize(const Standard_Integer theEdge1,
43 const Standard_Integer theEdge2,
44 const Standard_Integer theEdge3,
45 const Standard_Boolean theOrientation1,
46 const Standard_Boolean theOrientation2,
47 const Standard_Boolean theOrientation3,
48 const BRepMesh_DegreeOfFreedom isCanMove) ;
50 Standard_EXPORT void Edges(Standard_Integer& theEdge1,
51 Standard_Integer& theEdge2,
52 Standard_Integer& theEdge3,
53 Standard_Boolean& theOrientation1,
54 Standard_Boolean& theOrientation2,
55 Standard_Boolean& theOrientation3) const;
57 inline BRepMesh_DegreeOfFreedom Movability() const
62 Standard_EXPORT void SetMovability(const BRepMesh_DegreeOfFreedom theMovability) ;
64 Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const;
66 Standard_EXPORT Standard_Boolean IsEqual(const BRepMesh_Triangle& theOther) const;
68 Standard_Boolean operator ==(const BRepMesh_Triangle& theOther) const
70 return IsEqual(theOther);
75 Standard_Integer myEdge1;
76 Standard_Integer myEdge2;
77 Standard_Integer myEdge3;
78 Standard_Boolean myOrientation1;
79 Standard_Boolean myOrientation2;
80 Standard_Boolean myOrientation3;
81 BRepMesh_DegreeOfFreedom myMovability;
85 inline Standard_Integer HashCode(const BRepMesh_Triangle& theTriangle,
86 const Standard_Integer theUpper)
88 return theTriangle.HashCode(theUpper);