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