1 -- Created on: 1991-11-21
2 -- Created by: NW,JPB,CAL
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class PickDescriptor from Visual3d
26 ---Purpose: This class contains the pick information.
27 -- It contains a certain number of PickPaths.
29 ---Keywords: Pick Descriptor, Path, Structure, PickId
36 Structure from Graphic3d,
37 ContextPick from Visual3d,
38 PickPath from Visual3d,
39 HSequenceOfPickPath from Visual3d
43 PickError from Visual3d
47 Create ( CTX : ContextPick from Visual3d )
48 returns PickDescriptor from Visual3d;
50 ---Purpose: Creates a PickDescriptor <me>.
52 ---------------------------------------------------
53 -- Category: Methods to modify the class definition
54 ---------------------------------------------------
56 AddPickPath ( me : in out;
57 APickPath : PickPath from Visual3d )
60 ---Purpose: Adds a PickPath to PickDescriptor <me>.
61 ---Category: Methods to modify the class definition
66 ---Purpose: Erases all the information in <me>.
67 ---Category: Methods to modify the class definition
69 ----------------------------
70 -- Category: Inquire methods
71 ----------------------------
74 returns Integer from Standard
77 ---Purpose: Returns the pick depth, that is the
78 -- number of PickPaths available in the PickDescriptor.
79 ---Category: Inquire methods
82 returns HSequenceOfPickPath from Visual3d
85 ---Purpose: Returns the group of PickPaths of <me>.
86 ---Category: Inquire methods
89 returns Structure from Graphic3d
91 ---Purpose: Returns the root structure.
92 -- If the pick order was of the type TOO_TOPFIRST
93 -- then it's the first structure.
94 -- If the pick order was of the type TOO_BOTTOMFIRST
95 -- Then it's the last structure.
96 -- The pick order is set by the method SetOrder
98 -- Category: Inquire methods
99 -- Warning: Raises PickError if Depth == 0 (no picked structure).
100 raises PickError from Visual3d is static;
103 returns Integer from Standard
105 ---Purpose: Returns the root structure pickid.
106 -- If the pick order was of the type TOO_TOPFIRST
107 -- then it's the first pickid.
108 -- If the pick order was of the type TOO_BOTTOMFIRST
109 -- then it's the last pickid.
110 -- The pick order is set by the method SetOrder
112 -- Category: Inquire methods
113 -- Warning: Raises PickError if Depth == 0 (no picked structure).
114 raises PickError from Visual3d is static;
116 TopElementNumber ( me )
117 returns Integer from Standard
119 ---Purpose: Returns the root structure element number.
120 -- If the pick order was of the type TOO_TOPFIRST
121 -- then it's the first element number.
122 -- If the pick order was of the type TOO_BOTTOMFIRST
123 -- then it's the last element number.
124 -- The pick order is set by the method SetOrder
126 -- Category: Inquire methods
127 -- Warning: Raises PickError if Depth == 0 (no picked structure).
128 raises PickError from Visual3d is static;
135 -- Class : Visual3d_PickDescriptor
137 -- Purpose : Declaration of variables specific to the class
138 -- describing a pick.
140 -- Reminders : A pick return is defined by:
141 -- - a sequence of (Elem_number, Pick_Id, Struct_Id)
145 MyPickPathSequence : HSequenceOfPickPath from Visual3d;
147 -- context associated to a pick
148 MyContext : ContextPick from Visual3d;