0025773: Visualization - remove AIS_Drawer class and transfer its Link() logic to...
[occt.git] / src / AIS / AIS_Trihedron.cdl
CommitLineData
b311480e 1-- Created on: 1995-10-09
2-- Created by: Arnaud BOUZY/Odile Olivier
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
7fd59977 17-- Modified by: rob Wed Feb 11 -> Size of Trihedron
7fd59977 18
19class Trihedron from AIS inherits InteractiveObject from AIS
20
21 ---Purpose: Create a selectable trihedron
22 -- there are 4 modes of selection :
23 -- mode = 0 to select triedron ,priority = 1
24 -- mode = 1 to select its origine ,priority = 5
25 -- mode = 2 to select its axis ,priority = 3
26 -- mode = 3 to select its planes ,priority = 2
27 -- a trihedron has 1 origine,3 axes,3 planes.
28 -- Warning
29 -- For the presentation of trihedra, the default unit of
30 -- length is the millimetre, and the default value for the
31 -- representation of the axes is 100. If you modify these
32 -- dimensions, you must temporarily recover the Drawer.
33 -- From inside it, you take the aspect in which the values
34 -- for length are stocked. For trihedra, this is
6262338c 35 -- Prs3d_Drawer_FirstAxisAspect. You change the
7fd59977 36 -- values inside this Aspect and recalculate the presentation.
29d43f9c
A
37 -- If you want to use extended selection modes, different than 0,
38 -- you should take care of removing of the shapes from the interactive
39 -- context that has been computed for selection; it might be necessary
40 -- when you change selection mode. You can use methods Axis, Point,
41 -- Plane to retrieve the shapes.
7fd59977 42
43uses
44 Axis2Placement from Geom,
0717ddc1 45 Trsf from gp,
7fd59977 46 Presentation from Prs3d,
47 PresentationManager3d from PrsMgr,
48 NameOfColor from Quantity,
49 Color from Quantity,
50 Selection from SelectMgr,
51 Projector from Prs3d,
52 Transformation from Geom,
7fd59977 53 Axis from AIS,
54 Point from AIS,
55 Plane from AIS,
56 KindOfInteractive from AIS,
57 InteractiveContext from AIS,
29d43f9c
A
58 Array1OfPnt from TColgp,
59 Location from TopLoc
7fd59977 60is
61
62 Create(aComponent : Axis2Placement from Geom)
6e33d3ce 63 returns Trihedron from AIS;
7fd59977 64 --- Purpose: Initializes a trihedron entity.
65
66 Component(me) returns any Axis2Placement from Geom
67 is static;
68 ---Purpose: Returns the right-handed coordinate system set in SetComponent.
69 ---C++: inline
70 ---C++: return const&
71
72 SetComponent(me: mutable;aComponent : Axis2Placement from Geom)
73 is static;
74 ---Purpose: Constructs the right-handed coordinate system aComponent.
75
76 HasOwnSize(me) returns Boolean from Standard;
77 ---Purpose: Returns true if the trihedron object has a size other
78 -- than the default size of 100 mm. along each axis.
79 ---C++: inline
80
81 SetSize(me:mutable;aValue : Real from Standard);
82 ---Purpose: Sets the size aValue for the trihedron object.
83 -- The default value is 100 mm.
84
85 UnsetSize(me:mutable);
86 ---Purpose: Removes any non-default settings for size of this
87 -- trihedron object.
88
89 Size(me) returns Real from Standard;
90
91
92 XAxis (me) returns Axis from AIS;
93 ---Purpose : Returns the "XAxis".
94
95 YAxis (me) returns Axis from AIS;
96 ---Purpose : Returns the "YAxis".
97
98 Axis (me) returns Axis from AIS;
99 ---Purpose : Returns the main Axis.
100
101 Position (me) returns Point from AIS;
102 ---Purpose : Returns the origine.
103
104 XYPlane (me) returns Plane from AIS;
105 ---Purpose : Returns the "XYPlane".
106
107 XZPlane (me) returns Plane from AIS;
108 ---Purpose : Returns the "XZPlane".
109
110 YZPlane (me) returns Plane from AIS;
111 ---Purpose : Returns the "YZPlane".
112
113
114 SetContext(me:mutable; aCtx : InteractiveContext from AIS)
115 is redefined;
116 ---Purpose: connection to <aCtx> default drawer implies a recomputation
117 -- of SubObjects values.
118
119 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static;
120 ---Purpose: Returns true if the display mode selected, aMode, is
121 -- valid for trihedron datums.
122
123 Compute(me : mutable;
124 aPresentationManager: PresentationManager3d from PrsMgr;
6e33d3ce 125 aPresentation : Presentation from Prs3d;
7fd59977 126 aMode : Integer from Standard = 0)
127 is redefined static private;
128
129 Compute(me:mutable;
130 aProjector: Projector from Prs3d;
6e33d3ce 131 aPresentation: Presentation from Prs3d)
7fd59977 132 is redefined static private;
133
128cc8df 134
7fd59977 135
136 Compute(me : mutable;
137 aProjector : Projector from Prs3d;
138 aTrsf : Transformation from Geom;
6e33d3ce 139 aPresentation : Presentation from Prs3d)
7fd59977 140 is redefined;
141 ---Purpose: Computes the presentation according to a point of view
142 -- given by <aProjector>.
143 -- To be Used when the associated degenerated Presentations
144 -- have been transformed by <aTrsf> which is not a Pure
145 -- Translation. The HLR Prs can't be deducted automatically
146 -- WARNING :<aTrsf> must be applied
147 -- to the object to display before computation !!!
148
29d43f9c
A
149-- Methods from PresentableObject
150
0717ddc1 151 SetLocalTransformation(me:mutable; theTransformation:Trsf from gp) is redefined static;
29d43f9c 152
7fd59977 153-- Methods from SelectableObject
154
155 ComputeSelection(me : mutable;
6e33d3ce 156 aSelection : Selection from SelectMgr;
7fd59977 157 aMode : Integer from Standard)is private;
158
159-- Methods from InteractiveObject
160
161 Signature(me) returns Integer from Standard is redefined;
162 ---Purpose: Returns index 3, selection of the planes XOY, YOZ, XOZ.
163 Type(me) returns KindOfInteractive from AIS is redefined;
164 ---Purpose: Indicates that the type of Interactive Object is datum.
165 SetColor(me :mutable; aColor : NameOfColor from Quantity)
166 is redefined static ;
167
168 SetColor(me :mutable; aColor : Color from Quantity)
169 is redefined static ;
170 ---Purpose: Sets the color aColor for this trihedron object.
171 SetTextColor(me :mutable; aColor : NameOfColor from Quantity)
172 is static ;
173
174 HasTextColor(me) returns Boolean from Standard
175 is static ;
176
177 TextColor(me) returns NameOfColor from Quantity
178 is static ;
179
180 SetArrowColor(me :mutable; aColor : NameOfColor from Quantity)
181 is static ;
182
183 HasArrowColor(me) returns Boolean from Standard
184 is static ;
185
186 ArrowColor(me) returns NameOfColor from Quantity
187 is static ;
188
189 ExtremityPoints(me;TheExtrem : in out Array1OfPnt from TColgp);
190 ---Purpose: Returns the four extremities of the trihedron from the
191 -- array of points, TheExtrem.
192
193
194 UnsetColor(me:mutable) is redefined static;
195 ---Purpose: Removes the settings for color.
196 UnsetWidth(me:mutable) is redefined static;
197 ---Purpose: Removes the non-default settings for width set in SetWidth.
198
199 LoadSubObjects(me:mutable) is static private;
200
201
202fields
203 myComponent : Axis2Placement from Geom;
204 myShapes : InteractiveObject from AIS [7];
205 myHasOwnSize: Boolean from Standard;
206 myHasOwnTextColor : Boolean from Standard;
207 myOwnTextColor: NameOfColor from Quantity;
208 myHasOwnArrowColor : Boolean from Standard;
209 myOwnArrowColor: NameOfColor from Quantity;
210
211end Trihedron from AIS;