1 // Created on: 2008-05-21
2 // Created by: Vladislav ROMASHKO
3 // Copyright (c) 2008-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _Voxel_BooleanOperation_HeaderFile
17 #define _Voxel_BooleanOperation_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <Standard_Boolean.hxx>
30 //! Boolean operations (fuse, cut)
31 //! for voxels of the same dimension.
32 class Voxel_BooleanOperation
39 //! An empty constructor.
40 Standard_EXPORT Voxel_BooleanOperation();
42 //! Fuses two cubes of voxels.
43 //! It modifies the first cube of voxels.
44 //! It returns false in case of different dimension of the cube,
45 //! different number of voxels.
46 Standard_EXPORT Standard_Boolean Fuse (Voxel_BoolDS& theVoxels1, const Voxel_BoolDS& theVoxels2) const;
48 //! Fuses two cubes of voxels.
49 //! It modifies the first cube of voxels.
50 //! It returns false in case of different dimension of the cube,
51 //! different number of voxels.
52 //! It summerizes the value of corresponding voxels and puts the result to theVoxels1.
53 //! If the result exceeds 15 or becomes greater, it keeps 15.
54 Standard_EXPORT Standard_Boolean Fuse (Voxel_ColorDS& theVoxels1, const Voxel_ColorDS& theVoxels2) const;
56 //! Fuses two cubes of voxels.
57 //! It modifies the first cube of voxels.
58 //! It returns false in case of different dimension of the cube,
59 //! different number of voxels.
60 //! It summerizes the value of corresponding voxels and puts the result to theVoxels1.
61 Standard_EXPORT Standard_Boolean Fuse (Voxel_FloatDS& theVoxels1, const Voxel_FloatDS& theVoxels2) const;
63 //! Cuts two cubes of voxels.
64 //! It modifies the first cube of voxels.
65 //! It returns false in case of different dimension of the cube,
66 //! different number of voxels.
67 Standard_EXPORT Standard_Boolean Cut (Voxel_BoolDS& theVoxels1, const Voxel_BoolDS& theVoxels2) const;
69 //! Cuts two cubes of voxels.
70 //! It modifies the first cube of voxels.
71 //! It returns false in case of different dimension of the cube,
72 //! different number of voxels.
73 //! It subtracts the value of corresponding voxels and puts the result to theVoxels1.
74 Standard_EXPORT Standard_Boolean Cut (Voxel_ColorDS& theVoxels1, const Voxel_ColorDS& theVoxels2) const;
76 //! Cuts two cubes of voxels.
77 //! It modifies the first cube of voxels.
78 //! It returns false in case of different dimension of the cube,
79 //! different number of voxels.
80 //! It subtracts the value of corresponding voxels and puts the result to theVoxels1.
81 Standard_EXPORT Standard_Boolean Cut (Voxel_FloatDS& theVoxels1, const Voxel_FloatDS& theVoxels2) const;
95 Standard_EXPORT Standard_Boolean Check (const Voxel_DS& theVoxels1, const Voxel_DS& theVoxels2) const;
108 #endif // _Voxel_BooleanOperation_HeaderFile