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