0024624: Lost word in license statement in source files
[occt.git] / src / Voxel / Voxel_TypeDef.hxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #ifndef _VOXEL_TYPEDEF_HXX_
15 #define _VOXEL_TYPEDEF_HXX_
16
17 // Basic data types
18
19 typedef struct
20 {
21   Standard_Integer ix;
22   Standard_Integer iy;
23   Standard_Integer iz;
24 } iXYZ;
25
26
27 // Maps and Tables
28
29 inline Standard_Integer HashCode(const iXYZ& me, const Standard_Integer upper)
30 {
31   return (Abs(me.ix + me.iy + me.iz) % upper) + 1;
32 }
33
34 inline Standard_Boolean IsEqual(const iXYZ& one, const iXYZ& two)
35
36   return one.ix == two.ix && one.iy == two.iy && one.iz == two.iz;
37 }
38
39 #include <NCollection_DefineBaseCollection.hxx>
40 DEFINE_BASECOLLECTION(iXYZbase, iXYZ)
41
42 #include <NCollection_DefineDataMap.hxx>
43 DEFINE_DATAMAP(iXYZIndex, iXYZbase, iXYZ, Standard_Integer)
44 DEFINE_DATAMAP(iXYZBool,  iXYZbase, iXYZ, Standard_Byte)
45
46 // Defines
47
48 #define VOXELS  "Voxels"
49 #define ASCII   "Ascii"
50 #define BINARY  "Binary"
51 #define BOOL    "Bool"
52 #define COLOR   "Color"
53 #define FLOAT   "Float"
54
55 #endif // _VOXEL_TYPEDEF_HXX_