b311480e |
1 | // Created on: 2003-10-08 |
2 | // Created by: Alexander SOLOVYOV |
973c2be1 |
3 | // Copyright (c) 2003-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
ebc93ae7 |
16 | #ifndef MeshVS_TwoColors_HeaderFile |
17 | #define MeshVS_TwoColors_HeaderFile |
7fd59977 |
18 | |
19 | #include <Quantity_Color.hxx> |
20 | |
f24125b9 |
21 | typedef struct { |
7fd59977 |
22 | unsigned int r1 : 8; |
23 | unsigned int g1 : 8; |
24 | unsigned int b1 : 8; |
25 | unsigned int r2 : 8; |
26 | unsigned int g2 : 8; |
27 | unsigned int b2 : 8; |
f24125b9 |
28 | } MeshVS_TwoColors; |
7fd59977 |
29 | |
30 | |
2b2be3fb |
31 | //! Computes a hash code for the key, in the range [1, theUpperBound] |
32 | //! @param theKey the key which hash code is to be computed |
33 | //! @param theUpperBound the upper bound of the range a computing hash code must be within |
34 | //! @return a computed hash code, in the range [1, theUpperBound] |
35 | Standard_EXPORT Standard_Integer HashCode (const MeshVS_TwoColors& theKey, Standard_Integer theUpperBound); |
7fd59977 |
36 | |
37 | Standard_EXPORT Standard_Boolean IsEqual (const MeshVS_TwoColors& K1, |
38 | const MeshVS_TwoColors& K2 ); |
39 | |
40 | Standard_EXPORT Standard_Boolean operator== ( const MeshVS_TwoColors& K1, |
41 | const MeshVS_TwoColors& K2 ); |
42 | |
43 | Standard_EXPORT MeshVS_TwoColors BindTwoColors ( const Quantity_Color&, const Quantity_Color& ); |
44 | Standard_EXPORT Quantity_Color ExtractColor ( MeshVS_TwoColors&, const Standard_Integer ); |
45 | Standard_EXPORT void ExtractColors ( MeshVS_TwoColors&, Quantity_Color&, Quantity_Color& ); |
46 | |
47 | #endif |