0024413: Visualization - get rid of projection shift from orthographic camera definition
[occt.git] / src / StdSelect / StdSelect_ViewerSelector3d.cdl
CommitLineData
b311480e 1-- Created on: 1995-03-15
2-- Created by: Robert COUBLANC
3-- Copyright (c) 1995-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
197ac94e 17-- Modified by rob jun 25 98 : Add Method : Reactivate projector...
7fd59977 18
19class ViewerSelector3d from StdSelect inherits ViewerSelector from SelectMgr
20
197ac94e 21 ---Purpose: Selector Usable by Viewers from V3d
7fd59977 22
23uses
51b10cd4 24 View from V3d,
25 Selection from SelectMgr,
26 EntityOwner from SelectMgr,
27 Projector from Select3D,
28 Group from Graphic3d,
29 Structure from Graphic3d,
30 SequenceOfHClipPlane from Graphic3d,
31 Array1OfReal from TColStd,
32 Array1OfPnt2d from TColgp,
33 SensitivityMode from StdSelect,
197ac94e 34 Lin from gp,
35 Pnt from gp,
36 Dir from gp,
37 XYZ from gp
7fd59977 38
39is
40
41 Create returns mutable ViewerSelector3d from StdSelect;
197ac94e 42 ---Purpose: Constructs an empty 3D selector object.
7fd59977 43
197ac94e 44 Create (theProj : Projector from Select3D) returns mutable ViewerSelector3d from StdSelect;
45 ---Purpose: Constructs a 3D selector object defined by the projector <theProj>.
46
47 Convert (me : mutable; theSel : mutable Selection from SelectMgr)
7fd59977 48 is redefined static;
197ac94e 49 ---Level: Public
50 ---Purpose: Processes the projection of the sensitive primitives
51 -- in the active view ; to be done before the selection action...
7fd59977 52
197ac94e 53 Set (me : mutable; theProj : Projector from Select3D) is static;
54 ---Purpose: Sets the new projector <theProj> to replace the one used at construction time.
7fd59977 55
197ac94e 56 SetSensitivityMode (me : mutable;
57 theMode : SensitivityMode from StdSelect) is static;
3c982548 58 ---Purpose: Sets the selection sensitivity mode. SM_WINDOW mode
59 -- uses the specified pixel tolerance to compute the sensitivity
60 -- value, SM_VIEW mode allows to define the sensitivity manually.
61
197ac94e 62 SensitivityMode (me) returns SensitivityMode from StdSelect;
3c982548 63 ---C++: inline
64 ---Purpose: Returns the selection sensitivity mode.
65
197ac94e 66 SetPixelTolerance (me : mutable;
67 theTolerance : Integer) is static;
68 ---Purpose: Sets the pixel tolerance <theTolerance>.
3c982548 69
197ac94e 70 PixelTolerance (me) returns Integer from Standard;
3c982548 71 ---C++: inline
72 ---Purpose: Returns the pixel tolerance.
73
197ac94e 74 Pick (me : mutable; theXPix, theYPix : Integer;
75 theView : View from V3d) is static;
76 ---Level: Public
77 ---Purpose: Picks the sensitive entity at the pixel coordinates of
78 -- the mouse <theXPix> and <theYPix>. The selector looks for touched areas and owners.
7fd59977 79
197ac94e 80 Pick (me : mutable; theXPMin, theYPMin, theXPMax, theYPMax : Integer; theView : View from V3d) is static;
81 ---Purpose: Picks the sensitive entity according to the minimum
82 -- and maximum pixel values <theXPMin>, <theYPMin>, <theXPMax>
83 -- and <theYPMax> defining a 2D area for selection in the 3D view aView.
7fd59977 84
197ac94e 85 Pick (me : mutable; thePolyline : Array1OfPnt2d from TColgp; theView : View from V3d) is static;
86 ---Level: Public
87 ---Purpose: pick action - input pixel values for polyline selection for selection.
7fd59977 88
89 ---Category: Inquire Methods
90
91 Projector (me) returns Projector from Select3D;
197ac94e 92 ---Level: Public
93 ---Purpose: Returns the current Projector.
94 ---C++: inline
95 ---C++: return const&
7fd59977 96
97 ---Category: Internal Methods
98 -- -----------------
99
197ac94e 100 UpdateProj (me : mutable;
101 theView : View from V3d) returns Boolean is static private;
102 ---Level: Internal
7fd59977 103
197ac94e 104 DisplayAreas (me : mutable;
105 theView : View from V3d) is static;
106 ---Purpose: Displays sensitive areas found in the view <theView>.
7fd59977 107
197ac94e 108 ClearAreas (me : mutable;
109 theView : View from V3d) is static;
110 ---Purpose: Clears the view aView of sensitive areas found in it.
7fd59977 111
197ac94e 112 DisplaySensitive (me : mutable; theView : View from V3d) is static;
113 --- Purpose: Displays sensitives in view <theView>.
7fd59977 114
197ac94e 115 ClearSensitive (me : mutable; theView : View from V3d) is static;
7fd59977 116
197ac94e 117 DisplaySensitive (me : mutable;
118 theSel : Selection from SelectMgr;
119 theView : View from V3d;
120 theToClearOthers : Boolean from Standard = Standard_True)
7fd59977 121 is static;
197ac94e 122
123 DisplayAreas (me : mutable;
124 theSel : Selection from SelectMgr;
125 theView : View from V3d;
126 theToClearOthers : Boolean from Standard = Standard_True)
7fd59977 127 is static;
197ac94e 128
129 ComputeSensitivePrs (me : mutable; theSel: Selection from SelectMgr)
7fd59977 130 is static private;
197ac94e 131 ---Level: Internal
7fd59977 132
197ac94e 133 ComputeAreasPrs (me : mutable; theSel : Selection from SelectMgr)
134 is static private;
135 ---Level: Internal
7fd59977 136
51b10cd4 137 SetClipping (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d) is protected;
4269bd1b 138 ---Level: Internal
139 ---Purpose: Set view clipping for the selector.
140 -- @param thePlanes [in] the view planes.
141
51b10cd4 142 ComputeClipRange (me; thePlanes : SequenceOfHClipPlane from Graphic3d;
4269bd1b 143 thePickLine : Lin from gp;
144 theDepthMin, theDepthMax : out Real from Standard)
145 is protected;
146 ---Level: Internal
147 ---Purpose: Computed depth boundaries for the passed set of clipping planes and picking line.
148 -- @param thePlanes [in] the planes.
149 -- @param thePickLine [in] the picking line.
150 -- @param theDepthMin [out] minimum depth limit.
151 -- @param theDepthMax [out] maximum depth limit.
152
153 PickingLine (me; theX, theY : Real from Standard)
154 returns Lin from gp
155 is redefined protected;
156 ---Level: Internal
157 ---Purpose: For more details please refer to base class.
158
159 DepthClipping (me; theX, theY : Real from Standard;
160 theMin, theMax : out Real from Standard)
161 is redefined protected;
162 ---Level: Internal
163 ---Purpose: For more details please refer to base class.
164
165 DepthClipping (me; theX, theY : Real from Standard;
166 theOwner : EntityOwner from SelectMgr;
167 theMin, theMax : out Real from Standard)
168 is redefined protected;
169 ---Level: Internal
170 ---Purpose: For more details please refer to base class.
171
172 HasDepthClipping (me; theOwner : EntityOwner from SelectMgr)
173 returns Boolean is redefined protected;
174 ---Level: Internal
175 ---Purpose: For more details please refer to base class.
176
7fd59977 177fields
178
197ac94e 179 myProjector : Projector from Select3D;
180 myPrevAt : Real from Standard[3];
181 myPrevUp : Real from Standard[3];
182 myPrevProj : Real from Standard[3];
183 myPrevAxialScale : Real from Standard[3];
184 myPrevFOV : Real from Standard;
185 myPrevScale : Real from Standard;
186 myPrevOrthographic : Boolean from Standard;
187 mySensMode : SensitivityMode from StdSelect;
188 myPixelTolerance : Integer from Standard;
189 myToUpdateTolerance : Boolean from Standard;
190
191 --areas verification...
7fd59977 192
51b10cd4 193 myareagroup : Group from Graphic3d;
194 mysensgroup : Group from Graphic3d;
195 mystruct : Structure from Graphic3d;
196 myClipPlanes : SequenceOfHClipPlane from Graphic3d;
7fd59977 197
7fd59977 198end ViewerSelector3d;