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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class PickPath from Visual3d
21 ---Purpose: PickPath is a vector ( pick_id, struct_id, elem_num ).
22 -- It's one of the constituents of a PickDescriptor.
23 -- There are many PickPaths in a PickDescriptor.
24 -- Each PickPath describes a structure or a sub-structure.
25 -- The pick_id is set by SetPickId method from Group.
27 ---Keywords: Pick Path, PickId
34 Structure from Graphic3d
38 PickError from Visual3d
43 returns PickPath from Visual3d;
45 ---Purpose: Creates an undefined PickPath.
47 Create ( AElemNumber : Integer from Standard;
48 APickId : Integer from Standard;
49 AStructure : Structure from Graphic3d)
50 returns PickPath from Visual3d;
52 ---Purpose: Creates a PickPath :
53 -- <AElemNumber> : Element number of the structure picked.
54 -- <APickId> : Pick identifier of the structure picked.
55 -- <AStructure> : The picked structure.
57 ---------------------------------------------------
58 -- Category: Methods to modify the class definition
59 ---------------------------------------------------
61 SetElementNumber ( me : in out;
62 AElemNumber : Integer from Standard )
65 ---Purpose: Modifies the PickPath <me>.
66 -- <AElemNumber> : Element number of the structure picked.
67 ---Category: Methods to modify the class definition
69 SetPickIdentifier ( me : in out;
70 APickId : Integer from Standard )
73 ---Purpose: Modifies the PickPath <me>.
74 -- <APickId> : Pick identifier of the structure picked.
75 ---Category: Methods to modify the class definition
77 SetStructIdentifier ( me : in out;
78 AStructure : Structure from Graphic3d )
81 ---Purpose: Modifies the PickPath <me>.
82 -- <AStructure> : Identifier of the structure picked.
83 ---Category: Methods to modify the class definition
85 ----------------------------
86 -- Category: Inquire methods
87 ----------------------------
90 returns Integer from Standard
92 ---Purpose: Returns the element number stocked in the PickPath <me>.
93 -- Category: Inquire methods
94 -- Warning: Raises PickError if PickPath is empty (no picked structure).
95 raises PickError from Visual3d is static;
98 returns Integer from Standard
100 ---Purpose: Returns the pick identifier stocked in the PickPath <me>.
101 -- Category: Inquire methods
102 -- Warning: Raises PickError if PickPath is empty (no picked structure).
103 raises PickError from Visual3d is static;
105 StructIdentifier ( me )
106 returns Structure from Graphic3d
108 ---Purpose: Returns the structure stocked in the PickPath <me>.
109 -- Category: Inquire methods
110 -- Warning: Raises PickError if PickPath is empty (no picked structure).
111 raises PickError from Visual3d is static;
118 -- Class : Visual3d_PickPath
120 -- Purpose : Declaration of variables specific to the class
121 -- describing a picking.
123 -- Reminders : A pick is defined by :
124 -- - a vector (Elem_Num, Pick_Id, Structure)
129 MyElementNumber : Integer from Standard;
130 MyPickId : Integer from Standard;
131 MyStructure : Structure from Graphic3d;
133 -- the flag for definition
134 MyElementNumberIsDef : Boolean from Standard;
135 MyPickIdIsDef : Boolean from Standard;
136 MyStructureIsDef : Boolean from Standard;