blob: 5667a0a5eaa63cccd2f671c0e2d4ffc2b3fdc4ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
-- File: Voxel_BooleanOperation.cdl
-- Created: Wed May 21 10:59:19 2008
-- Author: Vladislav ROMASHKO
-- <vladislav.romashko@opencascade.com>
---Copyright: Open CASCADE S.A.
class BooleanOperation from Voxel
---Purpose: Boolean operations (fuse, cut)
-- for voxels of the same dimension.
uses
DS from Voxel,
BoolDS from Voxel,
ColorDS from Voxel,
FloatDS from Voxel
is
Create
---Purpose: An empty constructor.
returns BooleanOperation from Voxel;
---Category: Fusion
-- ======
Fuse(me;
theVoxels1 : in out BoolDS from Voxel;
theVoxels2 : in BoolDS from Voxel)
---Purpose: Fuses two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
returns Boolean from Standard;
Fuse(me;
theVoxels1 : in out ColorDS from Voxel;
theVoxels2 : in ColorDS from Voxel)
---Purpose: Fuses two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
-- It summerizes the value of corresponding voxels and puts the result to theVoxels1.
-- If the result exceeds 15 or becomes greater, it keeps 15.
returns Boolean from Standard;
Fuse(me;
theVoxels1 : in out FloatDS from Voxel;
theVoxels2 : in FloatDS from Voxel)
---Purpose: Fuses two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
-- It summerizes the value of corresponding voxels and puts the result to theVoxels1.
returns Boolean from Standard;
---Category: Cut
-- ===
Cut(me;
theVoxels1 : in out BoolDS from Voxel;
theVoxels2 : in BoolDS from Voxel)
---Purpose: Cuts two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
returns Boolean from Standard;
Cut(me;
theVoxels1 : in out ColorDS from Voxel;
theVoxels2 : in ColorDS from Voxel)
---Purpose: Cuts two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
-- It subtracts the value of corresponding voxels and puts the result to theVoxels1.
returns Boolean from Standard;
Cut(me;
theVoxels1 : in out FloatDS from Voxel;
theVoxels2 : in FloatDS from Voxel)
---Purpose: Cuts two cubes of voxels.
-- It modifies the first cube of voxels.
-- It returns false in case of different dimension of the cube,
-- different number of voxels.
-- It subtracts the value of corresponding voxels and puts the result to theVoxels1.
returns Boolean from Standard;
---Category: Private area
-- ============
Check(me;
theVoxels1 : DS from Voxel;
theVoxels2 : DS from Voxel)
returns Boolean from Standard
is private;
end BooleanOperation;
|