0025361: Sample "Voxel" crashes during "Demo - Collisions" demonstration
[occt.git] / src / Voxel / Voxel_Selector.cdl
1 -- Created on: 2008-07-30
2 -- Created by: Vladislav ROMASHKO
3 -- Copyright (c) 2008-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
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.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 class Selector from Voxel
17
18     ---Purpose: Detects voxels in the viewer 3d under the mouse cursor.
19
20 uses
21
22     View from V3d,
23     BoolDS from Voxel,
24     ColorDS from Voxel,
25     ROctBoolDS from Voxel
26
27 is
28
29     Create
30     ---Purpose: An empty constructor.
31     returns Selector from Voxel;
32     
33     Create(view : View from V3d)
34     ---Purpose: A constructor of the selector,
35     --          which initializes the classes
36     --          by a view, where the user selects the voxels.
37     returns Selector from Voxel;
38     
39     Init(me : in out;
40          view : View from V3d);
41     ---Purpose: Initializes the selector by a view, 
42     --          where the user selects the voxels.
43
44     SetVoxels(me : in out;
45               voxels : BoolDS from Voxel);
46     ---Purpose: Defines the voxels (1bit).
47
48     SetVoxels(me : in out;
49               voxels : ColorDS from Voxel);
50     ---Purpose: Defines the voxels (4bit).
51
52     SetVoxels(me : in out;
53               voxels : ROctBoolDS from Voxel);
54     ---Purpose: Defines the voxels (1bit recursive splitting).
55
56     Detect(me : in out;
57            winx : Integer from Standard;
58            winy : Integer from Standard;
59            ix : out Integer from Standard;
60            iy : out Integer from Standard;
61            iz : out Integer from Standard)
62     ---Purpose: Detects a voxel under the mouse cursor.
63     returns Boolean from Standard;
64
65 fields
66
67     myView : View from V3d;
68     myVoxels : Address from Standard;
69     myIsBool : Integer from Standard; -- 0 - ColorDS, 1 - BoolDS, 2 - ROctBoolDS
70     
71 end Selector;