0024637: Visualization - clean up implementation of rendering in immediate mode
[occt.git] / src / Visual3d / Visual3d_ContextPick.cdl
1 -- Created on: 1991-11-25
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class ContextPick from Visual3d
18
19         ---Version:
20
21         ---Purpose: This class allows the creation and update of
22         --          a pick context for one view of the viewer.
23         --          A context allows the control of different parameters
24         --          before the activation of a pick.
25         --
26         --          * the pick aperture.
27         --          * the depth of pick, the number of sub-structures selected.
28         --          * the order of picking, the possibility to traverse
29         --            the pick structures starting from the root
30         --            or the leaves.
31
32         ---Keywords: Pick, Context, Aperture, Depth, Order, Structure
33
34         ---Warning:
35         ---References:
36
37 uses
38
39         TypeOfOrder     from Visual3d
40
41 raises
42
43         ContextPickDefinitionError      from Visual3d
44
45 is
46
47         Create
48                 returns ContextPick from Visual3d;
49         ---Level: Public
50         ---Purpose: Creates a context from default values
51         --
52         --          Aperture    : 4.0
53         --          Depth       : 10
54         --          Order       : TOO_TOPFIRST
55
56         Create ( Aperture       : Real from Standard;
57                  Depth          : Integer from Standard;
58                  Order          : TypeOfOrder from Visual3d )
59                 returns ContextPick from Visual3d
60         ---Level: Public
61         ---Purpose: Creates a context with the values defined
62         --  Warning: Raises ContextPickDefinitionError if <Depth> or
63         --          <Aperture> is a negative value.
64         raises ContextPickDefinitionError;
65
66         -----------------------------------------------------
67         -- Category: Methods to modifies the class definition
68         -----------------------------------------------------
69
70         SetAperture ( me        : in out;
71                       Aperture  : Real from Standard )
72         ---Level: Public
73         ---Purpose: Modifies the size of the pick window.
74         --  Category: Methods to modifies the class definition
75         --  Warning: Raises ContextPickDefinitionError if <Aperture> is
76         --          a negative value.
77         raises ContextPickDefinitionError is static;
78
79         SetDepth ( me           : in out;
80                    Depth        : Integer from Standard )
81         ---Level: Public
82         ---Purpose: Modifies the pick depth a priori.
83         --  Category: Methods to modifies the class definition
84         --  Warning: Raises ContextPickDefinitionError if <Depth> is
85         --          a negative value.
86         raises ContextPickDefinitionError is static;
87
88         SetOrder ( me           : in out;
89                    Order        : TypeOfOrder from Visual3d ) is static;
90         ---Level: Public
91         ---Purpose: Modifies the order of picking.
92         --
93         --          TypeOfOrder : TOO_TOPFIRST
94         --                        TOO_BOTTOMFIRST
95         --
96         ---Category: Methods to modifies the class definition
97
98         ----------------------------
99         -- Category: Inquire methods
100         ----------------------------
101
102         Aperture ( me )
103                 returns Real from Standard is static;
104         ---Level: Public
105         ---Purpose: Returns the size of the pick window <me>.
106         ---Category: Inquire methods
107
108         Depth ( me )
109                 returns Integer from Standard is static;
110         ---Level: Public
111         ---Purpose: Returns the effective pick depth of <me>.
112         ---Category: Inquire methods
113
114         Order ( me )
115                 returns TypeOfOrder from Visual3d is static;
116         ---Level: Public
117         ---Purpose: Returns the order of picking of <me>.
118         --
119         --          TypeOfOrder : TOO_TOPFIRST
120         --                        TOO_BOTTOMFIRST
121         --
122         ---Category: Inquire methods
123
124 --\f
125
126 fields
127
128 --
129 -- Class        :       Visual3d_ContextPick
130 --
131 -- Purpose      :       Declaration of variables specific to
132 --                      pick contexts
133 --
134 -- Reminders    :       A pick context is defined by:
135 --                      - the pick aperture
136 --                      - the depth demanded
137 --                      - the order of traversing the structure
138
139         -- aperture of pick
140         MyAperture      :       Real from Standard;
141
142         -- depth of pick
143         MyDepth         :       Integer from Standard;
144
145         -- order of traversing pick structures
146         MyOrder         :       TypeOfOrder from Visual3d;
147
148 end ContextPick;