0024372: HLR Sample: erased objects are shown in HLR
[occt.git] / src / AIS / AIS_Plane.cdl
CommitLineData
b311480e 1-- Created on: 1995-08-02
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-- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22-- the restricted NameOfColor.
23--Modified by rob Wed 11 feb 98 : add Size Methods
7fd59977 24
25
26class Plane from AIS inherits InteractiveObject from AIS
27
28 ---Purpose: Constructs plane datums to be used in construction of
29 -- composite shapes.
30
31uses
32 Plane from Geom,
33 Presentation from Prs3d,
34 PresentationManager3d from PrsMgr,
35 NameOfColor from Quantity,
36 Color from Quantity,
37 Selection from SelectMgr,
38 Pnt from gp,
39 Projector from Prs3d,
40 Transformation from Geom,
7fd59977 41 NameOfMaterial from Graphic3d,
42 TypeOfPlane from AIS,
43 Axis2Placement from Geom,
44 InteractiveContext from AIS,
45 KindOfInteractive from AIS
46
47is
48 Create(aComponent : Plane from Geom;
49 aCurrentMode : Boolean from Standard = Standard_False)
50 returns mutable Plane from AIS;
51 ---Purpose: initializes the plane aComponent. If
52 -- the mode aCurrentMode equals true, the drawing
53 -- tool, "Drawer" is not initialized.
54
55 Create(aComponent : Plane from Geom;
56 aCenter : Pnt from gp;
57 aCurrentMode : Boolean from Standard = Standard_False)
58 returns mutable Plane from AIS;
59 --- Purpose: initializes the plane aComponent and
60 -- the point aCenter. If the mode aCurrentMode
61 -- equals true, the drawing tool, "Drawer" is not
62 -- initialized. aCurrentMode equals true, the drawing
63 -- tool, "Drawer" is not initialized.
64
65 Create(aComponent : Plane from Geom;
66 aCenter : Pnt from gp;
67 aPmin : Pnt from gp;
68 aPmax : Pnt from gp;
69 aCurrentMode : Boolean from Standard = Standard_False)
70 returns mutable Plane from AIS;
71 ---Purpose: initializes the plane aComponent, the
72 -- point aCenter, and the minimum and maximum
73 -- points, aPmin and aPmax. If the mode
74 -- aCurrentMode equals true, the drawing tool, "Drawer" is not initialized.
75
76 Create(aComponent : Axis2Placement from Geom;
77 aPlaneType : TypeOfPlane from AIS;
78 aCurrentMode : Boolean from Standard = Standard_False)
79 returns mutable Plane from AIS;
80
81
82 ---Category: Size Modifications...
83
84 SetSize(me:mutable;aValue:Real from Standard);
85 ---Purpose: Same value for x and y directions
86
87 SetSize(me:mutable;Xval,YVal:Real from Standard);
88 ---Purpose: Sets the size defined by the length along the X axis
89 -- XVal and the length along the Y axis YVal.
90
91 UnsetSize(me:mutable) ;
92
93 Size(me;X,Y:out Real from Standard) returns Boolean from Standard;
94
95 HasOwnSize(me) returns Boolean from Standard;
96 ---C++: inline
97
98
99
100 Signature(me) returns Integer from Standard is redefined;
101
102 Type(me) returns KindOfInteractive from AIS is redefined;
103
104
105
106 Component(me: mutable) returns Plane from Geom
107 is static;
108 ---Purpose: Returns the component specified in SetComponent.
109 ---C++: inline
110 ---C++: return const&
111
112 SetComponent(me: mutable;aComponent : Plane from Geom) is static;
113 ---Purpose: Creates an instance of the plane aComponent.
114
115 PlaneAttributes(me: mutable;
116 aComponent : out Plane from Geom;
117 aCenter : out Pnt from gp;
118 aPmin : out Pnt from gp;
119 aPmax : out Pnt from gp)
120 returns Boolean from Standard;
121 ---Purpose: Returns the settings for the selected plane
122 -- aComponent, provided in SetPlaneAttributes.
123 -- These include the points aCenter, aPmin, and aPmax
124
125 SetPlaneAttributes(me: mutable;
126 aComponent : Plane from Geom;
127 aCenter : Pnt from gp;
128 aPmin : Pnt from gp;
129 aPmax : Pnt from gp)
130 is static;
131 ---Purpose: Allows you to provide settings other than default ones
132 -- for the selected plane. These include: center point
133 -- aCenter, maximum aPmax and minimum aPmin.
134
135 Center (me) returns Pnt from gp;
136 ---Purpose: Returns the coordinates of the center point.
137 ---C++: inline
138 ---C++: return const&
139
140 SetCenter (me: mutable; aCenter : Pnt from gp);
141 ---Purpose:
142 -- Provides settings for the center aCenter other than (0, 0, 0).
143 ---C++: inline
144
145 SetAxis2Placement(me: mutable;
146 aComponent : Axis2Placement from Geom;
147 aPlaneType : TypeOfPlane from AIS)
148 is static;
149 ---Purpose: Allows you to provide settings for the position and
150 -- direction of one of the plane's axes, aComponent, in
151 -- 3D space. The coordinate system used is
152 -- right-handed, and the type of plane aPlaneType is one of:
153 -- - AIS_ TOPL_Unknown
154 -- - AIS_ TOPL_XYPlane
155 -- - AIS_ TOPL_XZPlane
156 -- - AIS_ TOPL_YZPlane}.
157
158 Axis2Placement(me: mutable) returns Axis2Placement from Geom
159 is static;
160 ---Purpose: Returns the position of the plane's axis2 system
161 -- identifying the x, y, or z axis and giving the plane a
162 -- direction in 3D space. An axis2 system is a right-handed coordinate system.
163
164 TypeOfPlane (me : mutable) returns TypeOfPlane from AIS;
165 ---Purpose: Returns the type of plane - xy, yz, xz or unknown.
166 ---C++: inline
167
168
169 IsXYZPlane (me : mutable) returns Boolean from Standard;
170 ---Purpose: Returns the type of plane - xy, yz, or xz.
171 ---C++: inline
172
173 CurrentMode (me : mutable) returns Boolean from Standard;
174 ---Purpose: Returns the non-default current display mode set by SetCurrentMode.
175 ---C++: inline
176
177 SetCurrentMode (me : mutable; aCurrentMode : Boolean from Standard ) ;
178 ---Purpose:
179 -- Allows you to provide settings for a non-default
180 -- current display mode.
181 ---C++: inline
182
183 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard
184 is redefined virtual;
185 ---Purpose: Returns true if the display mode selected, aMode, is valid for planes.
186
187 SetContext(me:mutable; aCtx : InteractiveContext from AIS) is redefined;
188 ---Purpose: connection to <aCtx> default drawer implies a recomputation of Frame values.
189
190-- Methods from PresentableObject
191
192 Compute(me : mutable;
193 aPresentationManager: PresentationManager3d from PrsMgr;
194 aPresentation : mutable Presentation from Prs3d;
195 aMode : Integer from Standard = 0)
196 is redefined virtual private;
197
198 Compute(me:mutable;
199 aProjector: Projector from Prs3d;
200 aPresentation: mutable Presentation from Prs3d)
128cc8df 201 is redefined virtual private;
7fd59977 202
203 Compute(me : mutable;
204 aProjector : Projector from Prs3d;
205 aTrsf : Transformation from Geom;
206 aPresentation : mutable Presentation from Prs3d)
207 is redefined;
208 ---Purpose: computes the presentation according to a point of view
209 -- given by <aProjector>.
210 -- To be Used when the associated degenerated Presentations
211 -- have been transformed by <aTrsf> which is not a Pure
212 -- Translation. The HLR Prs can't be deducted automatically
213 -- WARNING :<aTrsf> must be applied
214 -- to the object to display before computation !!!
215
216-- Methods from SelectableObject
217
218 ComputeSelection(me : mutable;
219 aSelection : mutable Selection from SelectMgr;
220 aMode : Integer from Standard) is redefined virtual;
221
222-- Methods from InteractiveObject
223
224 SetColor(me :mutable; aColor : NameOfColor from Quantity)
225 is redefined static;
226
227 SetColor(me :mutable; aColor : Color from Quantity)
228 is redefined static;
229
230 UnsetColor(me:mutable) is redefined static;
231
232 ComputeFrame(me: mutable)
233 is private;
234
235 ComputeFields(me: mutable)
236 is private;
237
238 InitDrawerAttributes(me:mutable) is private;
239
240fields
241
242 myComponent : Plane from Geom;
243 myAx2 : Axis2Placement from Geom;
244 myCenter : Pnt from gp;
245 myPmin : Pnt from gp;
246 myPmax : Pnt from gp;
247 myCurrentMode : Boolean from Standard;
248 myAutomaticPosition : Boolean from Standard;
249 myTypeOfPlane : TypeOfPlane from AIS;
250 myIsXYZPlane : Boolean from Standard;
251 myHasOwnSize : Boolean from Standard;
252
253end Plane;