1 -- Created on: 1995-08-02
2 -- Created by: Arnaud BOUZY/Odile Olivier
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
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
22 class Plane from AIS inherits InteractiveObject from AIS
24 ---Purpose: Constructs plane datums to be used in construction of
29 Presentation from Prs3d,
30 PresentationManager3d from PrsMgr,
31 NameOfColor from Quantity,
33 Selection from SelectMgr,
34 TypeOfSensitivity from Select3D,
37 Transformation from Geom,
38 NameOfMaterial from Graphic3d,
40 Axis2Placement from Geom,
41 InteractiveContext from AIS,
42 KindOfInteractive from AIS
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.
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.
62 Create(aComponent : Plane from Geom;
63 aCenter : 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.
73 Create(aComponent : Axis2Placement from Geom;
74 aPlaneType : TypeOfPlane from AIS;
75 aCurrentMode : Boolean from Standard = Standard_False)
76 returns mutable Plane from AIS;
79 ---Category: Size Modifications...
81 SetSize(me:mutable;aValue:Real from Standard);
82 ---Purpose: Same value for x and y directions
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.
88 UnsetSize(me:mutable) ;
90 Size(me;X,Y:out Real from Standard) returns Boolean from Standard;
92 HasOwnSize(me) returns Boolean from Standard;
97 Signature(me) returns Integer from Standard is redefined;
99 Type(me) returns KindOfInteractive from AIS is redefined;
103 Component(me: mutable) returns Plane from Geom
105 ---Purpose: Returns the component specified in SetComponent.
107 ---C++: return const&
109 SetComponent(me: mutable;aComponent : Plane from Geom) is static;
110 ---Purpose: Creates an instance of the plane aComponent.
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
122 SetPlaneAttributes(me: mutable;
123 aComponent : Plane from Geom;
124 aCenter : Pnt from gp;
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.
132 Center (me) returns Pnt from gp;
133 ---Purpose: Returns the coordinates of the center point.
135 ---C++: return const&
137 SetCenter (me: mutable; aCenter : Pnt from gp);
139 -- Provides settings for the center aCenter other than (0, 0, 0).
142 SetAxis2Placement(me: mutable;
143 aComponent : Axis2Placement from Geom;
144 aPlaneType : TypeOfPlane from AIS)
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}.
155 Axis2Placement(me: mutable) returns Axis2Placement from Geom
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.
161 TypeOfPlane (me : mutable) returns TypeOfPlane from AIS;
162 ---Purpose: Returns the type of plane - xy, yz, xz or unknown.
166 IsXYZPlane (me : mutable) returns Boolean from Standard;
167 ---Purpose: Returns the type of plane - xy, yz, or xz.
170 CurrentMode (me : mutable) returns Boolean from Standard;
171 ---Purpose: Returns the non-default current display mode set by SetCurrentMode.
174 SetCurrentMode (me : mutable; aCurrentMode : Boolean from Standard ) ;
176 -- Allows you to provide settings for a non-default
177 -- current display mode.
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.
184 SetContext(me:mutable; aCtx : InteractiveContext from AIS) is redefined;
185 ---Purpose: connection to <aCtx> default drawer implies a recomputation of Frame values.
187 TypeOfSensitivity (me) returns TypeOfSensitivity from Select3D;
189 ---Purpose: Returns the type of sensitivity for the plane;
191 SetTypeOfSensitivity (me: mutable;
192 theTypeOfSensitivity: TypeOfSensitivity from Select3D);
194 ---Purpose: Sets the type of sensitivity for the plane.
196 -- Methods from PresentableObject
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;
205 aProjector: Projector from Prs3d;
206 aPresentation: mutable Presentation from Prs3d)
207 is redefined virtual private;
209 Compute(me : mutable;
210 aProjector : Projector from Prs3d;
211 aTrsf : Transformation from Geom;
212 aPresentation : mutable Presentation from Prs3d)
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 !!!
222 -- Methods from SelectableObject
224 ComputeSelection (me : mutable;
225 theSelection : mutable Selection from SelectMgr;
226 theMode : Integer from Standard) is redefined virtual;
228 -- Methods from InteractiveObject
230 SetColor(me :mutable; aColor : NameOfColor from Quantity)
233 SetColor(me :mutable; aColor : Color from Quantity)
236 UnsetColor(me:mutable) is redefined static;
238 ComputeFrame(me: mutable)
241 ComputeFields(me: mutable)
244 InitDrawerAttributes(me:mutable) is private;
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;
258 myTypeOfSensitivity: TypeOfSensitivity from Select3D;