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