0024624: Lost word in license statement in source files
[occt.git] / src / BRepMesh / BRepMesh_Triangle.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepMesh_Triangle_HeaderFile
18 #define _BRepMesh_Triangle_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Macro.hxx>
23
24 #include <BRepMesh_DegreeOfFreedom.hxx>
25
26 class BRepMesh_Triangle  {
27 public:
28
29   DEFINE_STANDARD_ALLOC
30
31   
32   Standard_EXPORT BRepMesh_Triangle();
33   
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);
41   
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) ;
49   
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;
56   
57   inline BRepMesh_DegreeOfFreedom Movability() const 
58   {
59     return myMovability;
60   }
61   
62   Standard_EXPORT void SetMovability(const BRepMesh_DegreeOfFreedom theMovability) ;
63   
64   Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const;
65   
66   Standard_EXPORT Standard_Boolean IsEqual(const BRepMesh_Triangle& theOther) const;
67   
68   Standard_Boolean operator ==(const BRepMesh_Triangle& theOther) const
69   {
70     return IsEqual(theOther);
71   }
72
73 private:
74
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;
82 };
83
84 // Inline functions
85 inline Standard_Integer HashCode(const BRepMesh_Triangle& theTriangle,
86                                  const Standard_Integer theUpper)
87 {
88  return theTriangle.HashCode(theUpper);
89 }
90
91 #endif