0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[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,
7fd59977 61 Axis from AIS,
62 Point from AIS,
63 Plane from AIS,
64 KindOfInteractive from AIS,
65 InteractiveContext from AIS,
29d43f9c
A
66 Array1OfPnt from TColgp,
67 Location from TopLoc
7fd59977 68is
69
70 Create(aComponent : Axis2Placement from Geom)
71 returns mutable Trihedron from AIS;
72 --- Purpose: Initializes a trihedron entity.
73
74 Component(me) returns any Axis2Placement from Geom
75 is static;
76 ---Purpose: Returns the right-handed coordinate system set in SetComponent.
77 ---C++: inline
78 ---C++: return const&
79
80 SetComponent(me: mutable;aComponent : Axis2Placement from Geom)
81 is static;
82 ---Purpose: Constructs the right-handed coordinate system aComponent.
83
84 HasOwnSize(me) returns Boolean from Standard;
85 ---Purpose: Returns true if the trihedron object has a size other
86 -- than the default size of 100 mm. along each axis.
87 ---C++: inline
88
89 SetSize(me:mutable;aValue : Real from Standard);
90 ---Purpose: Sets the size aValue for the trihedron object.
91 -- The default value is 100 mm.
92
93 UnsetSize(me:mutable);
94 ---Purpose: Removes any non-default settings for size of this
95 -- trihedron object.
96
97 Size(me) returns Real from Standard;
98
99
100 XAxis (me) returns Axis from AIS;
101 ---Purpose : Returns the "XAxis".
102
103 YAxis (me) returns Axis from AIS;
104 ---Purpose : Returns the "YAxis".
105
106 Axis (me) returns Axis from AIS;
107 ---Purpose : Returns the main Axis.
108
109 Position (me) returns Point from AIS;
110 ---Purpose : Returns the origine.
111
112 XYPlane (me) returns Plane from AIS;
113 ---Purpose : Returns the "XYPlane".
114
115 XZPlane (me) returns Plane from AIS;
116 ---Purpose : Returns the "XZPlane".
117
118 YZPlane (me) returns Plane from AIS;
119 ---Purpose : Returns the "YZPlane".
120
121
122 SetContext(me:mutable; aCtx : InteractiveContext from AIS)
123 is redefined;
124 ---Purpose: connection to <aCtx> default drawer implies a recomputation
125 -- of SubObjects values.
126
127 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static;
128 ---Purpose: Returns true if the display mode selected, aMode, is
129 -- valid for trihedron datums.
130
131 Compute(me : mutable;
132 aPresentationManager: PresentationManager3d from PrsMgr;
133 aPresentation : mutable Presentation from Prs3d;
134 aMode : Integer from Standard = 0)
135 is redefined static private;
136
137 Compute(me:mutable;
138 aProjector: Projector from Prs3d;
139 aPresentation: mutable Presentation from Prs3d)
140 is redefined static private;
141
128cc8df 142
7fd59977 143
144 Compute(me : mutable;
145 aProjector : Projector from Prs3d;
146 aTrsf : Transformation from Geom;
147 aPresentation : mutable Presentation from Prs3d)
148 is redefined;
149 ---Purpose: Computes the presentation according to a point of view
150 -- given by <aProjector>.
151 -- To be Used when the associated degenerated Presentations
152 -- have been transformed by <aTrsf> which is not a Pure
153 -- Translation. The HLR Prs can't be deducted automatically
154 -- WARNING :<aTrsf> must be applied
155 -- to the object to display before computation !!!
156
29d43f9c
A
157-- Methods from PresentableObject
158
159 SetLocation(me : mutable;
160 aLoc : Location from TopLoc)
161 is redefined static;
162
7fd59977 163-- Methods from SelectableObject
164
165 ComputeSelection(me : mutable;
166 aSelection : mutable Selection from SelectMgr;
167 aMode : Integer from Standard)is private;
168
169-- Methods from InteractiveObject
170
171 Signature(me) returns Integer from Standard is redefined;
172 ---Purpose: Returns index 3, selection of the planes XOY, YOZ, XOZ.
173 Type(me) returns KindOfInteractive from AIS is redefined;
174 ---Purpose: Indicates that the type of Interactive Object is datum.
175 SetColor(me :mutable; aColor : NameOfColor from Quantity)
176 is redefined static ;
177
178 SetColor(me :mutable; aColor : Color from Quantity)
179 is redefined static ;
180 ---Purpose: Sets the color aColor for this trihedron object.
181 SetTextColor(me :mutable; aColor : NameOfColor from Quantity)
182 is static ;
183
184 HasTextColor(me) returns Boolean from Standard
185 is static ;
186
187 TextColor(me) returns NameOfColor from Quantity
188 is static ;
189
190 SetArrowColor(me :mutable; aColor : NameOfColor from Quantity)
191 is static ;
192
193 HasArrowColor(me) returns Boolean from Standard
194 is static ;
195
196 ArrowColor(me) returns NameOfColor from Quantity
197 is static ;
198
199 ExtremityPoints(me;TheExtrem : in out Array1OfPnt from TColgp);
200 ---Purpose: Returns the four extremities of the trihedron from the
201 -- array of points, TheExtrem.
202
203
204 UnsetColor(me:mutable) is redefined static;
205 ---Purpose: Removes the settings for color.
206 UnsetWidth(me:mutable) is redefined static;
207 ---Purpose: Removes the non-default settings for width set in SetWidth.
208
209 LoadSubObjects(me:mutable) is static private;
210
211
212fields
213 myComponent : Axis2Placement from Geom;
214 myShapes : InteractiveObject from AIS [7];
215 myHasOwnSize: Boolean from Standard;
216 myHasOwnTextColor : Boolean from Standard;
217 myOwnTextColor: NameOfColor from Quantity;
218 myHasOwnArrowColor : Boolean from Standard;
219 myOwnArrowColor: NameOfColor from Quantity;
220
221end Trihedron from AIS;