0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / BRepMesh / BRepMesh_Triangle.hxx
CommitLineData
304c45c8 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
5//
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.
10//
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.
13//
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.
20
21#ifndef _BRepMesh_Triangle_HeaderFile
22#define _BRepMesh_Triangle_HeaderFile
23
24#include <Standard.hxx>
25#include <Standard_DefineAlloc.hxx>
26#include <Standard_Macro.hxx>
27
28#include <BRepMesh_DegreeOfFreedom.hxx>
29
30class BRepMesh_Triangle {
31public:
32
33 DEFINE_STANDARD_ALLOC
34
35
36 Standard_EXPORT BRepMesh_Triangle();
37
38 Standard_EXPORT BRepMesh_Triangle(const Standard_Integer theEdge1,
39 const Standard_Integer theEdge2,
40 const Standard_Integer theEdge3,
41 const Standard_Boolean theOrientation1,
42 const Standard_Boolean theOrientation2,
43 const Standard_Boolean theOrientation3,
44 const BRepMesh_DegreeOfFreedom isCanMove);
45
46 Standard_EXPORT void Initialize(const Standard_Integer theEdge1,
47 const Standard_Integer theEdge2,
48 const Standard_Integer theEdge3,
49 const Standard_Boolean theOrientation1,
50 const Standard_Boolean theOrientation2,
51 const Standard_Boolean theOrientation3,
52 const BRepMesh_DegreeOfFreedom isCanMove) ;
53
54 Standard_EXPORT void Edges(Standard_Integer& theEdge1,
55 Standard_Integer& theEdge2,
56 Standard_Integer& theEdge3,
57 Standard_Boolean& theOrientation1,
58 Standard_Boolean& theOrientation2,
59 Standard_Boolean& theOrientation3) const;
60
61 inline BRepMesh_DegreeOfFreedom Movability() const
62 {
63 return myMovability;
64 }
65
66 Standard_EXPORT void SetMovability(const BRepMesh_DegreeOfFreedom theMovability) ;
67
68 Standard_EXPORT Standard_Integer HashCode(const Standard_Integer theUpper) const;
69
70 Standard_EXPORT Standard_Boolean IsEqual(const BRepMesh_Triangle& theOther) const;
71
72 Standard_Boolean operator ==(const BRepMesh_Triangle& theOther) const
73 {
74 return IsEqual(theOther);
75 }
76
77private:
78
79 Standard_Integer myEdge1;
304c45c8 80 Standard_Integer myEdge2;
304c45c8 81 Standard_Integer myEdge3;
eafb234b 82 Standard_Boolean myOrientation1;
83 Standard_Boolean myOrientation2;
304c45c8 84 Standard_Boolean myOrientation3;
85 BRepMesh_DegreeOfFreedom myMovability;
86};
87
88// Inline functions
89inline Standard_Integer HashCode(const BRepMesh_Triangle& theTriangle,
90 const Standard_Integer theUpper)
91{
92 return theTriangle.HashCode(theUpper);
93}
94
95#endif