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 --Modified by rob Wed 11 feb 98 : add Size Methods
20 class Plane from AIS inherits InteractiveObject from AIS
22 ---Purpose: Constructs plane datums to be used in construction of
27 Presentation from Prs3d,
28 PresentationManager3d from PrsMgr,
29 NameOfColor from Quantity,
31 Selection from SelectMgr,
32 TypeOfSensitivity from Select3D,
35 Transformation from Geom,
36 NameOfMaterial from Graphic3d,
38 Axis2Placement from Geom,
39 InteractiveContext from AIS,
40 KindOfInteractive from AIS
43 Create(aComponent : Plane from Geom;
44 aCurrentMode : Boolean from Standard = Standard_False)
45 returns Plane from AIS;
46 ---Purpose: initializes the plane aComponent. If
47 -- the mode aCurrentMode equals true, the drawing
48 -- tool, "Drawer" is not initialized.
50 Create(aComponent : Plane from Geom;
51 aCenter : Pnt from gp;
52 aCurrentMode : Boolean from Standard = Standard_False)
53 returns Plane from AIS;
54 --- Purpose: initializes the plane aComponent and
55 -- the point aCenter. If the mode aCurrentMode
56 -- equals true, the drawing tool, "Drawer" is not
57 -- initialized. aCurrentMode equals true, the drawing
58 -- tool, "Drawer" is not initialized.
60 Create(aComponent : Plane from Geom;
61 aCenter : Pnt from gp;
64 aCurrentMode : Boolean from Standard = Standard_False)
65 returns Plane from AIS;
66 ---Purpose: initializes the plane aComponent, the
67 -- point aCenter, and the minimum and maximum
68 -- points, aPmin and aPmax. If the mode
69 -- aCurrentMode equals true, the drawing tool, "Drawer" is not initialized.
71 Create(aComponent : Axis2Placement from Geom;
72 aPlaneType : TypeOfPlane from AIS;
73 aCurrentMode : Boolean from Standard = Standard_False)
74 returns Plane from AIS;
77 ---Category: Size Modifications...
79 SetSize(me:mutable;aValue:Real from Standard);
80 ---Purpose: Same value for x and y directions
82 SetSize(me:mutable;Xval,YVal:Real from Standard);
83 ---Purpose: Sets the size defined by the length along the X axis
84 -- XVal and the length along the Y axis YVal.
86 UnsetSize(me:mutable) ;
88 Size(me;X,Y:out Real from Standard) returns Boolean from Standard;
90 HasOwnSize(me) returns Boolean from Standard;
95 Signature(me) returns Integer from Standard is redefined;
97 Type(me) returns KindOfInteractive from AIS is redefined;
101 Component(me: mutable) returns Plane from Geom
103 ---Purpose: Returns the component specified in SetComponent.
105 ---C++: return const&
107 SetComponent(me: mutable;aComponent : Plane from Geom) is static;
108 ---Purpose: Creates an instance of the plane aComponent.
110 PlaneAttributes(me: mutable;
111 aComponent : out Plane from Geom;
112 aCenter : out Pnt from gp;
113 aPmin : out Pnt from gp;
114 aPmax : out Pnt from gp)
115 returns Boolean from Standard;
116 ---Purpose: Returns the settings for the selected plane
117 -- aComponent, provided in SetPlaneAttributes.
118 -- These include the points aCenter, aPmin, and aPmax
120 SetPlaneAttributes(me: mutable;
121 aComponent : Plane from Geom;
122 aCenter : Pnt from gp;
126 ---Purpose: Allows you to provide settings other than default ones
127 -- for the selected plane. These include: center point
128 -- aCenter, maximum aPmax and minimum aPmin.
130 Center (me) returns Pnt from gp;
131 ---Purpose: Returns the coordinates of the center point.
133 ---C++: return const&
135 SetCenter (me: mutable; aCenter : Pnt from gp);
137 -- Provides settings for the center aCenter other than (0, 0, 0).
140 SetAxis2Placement(me: mutable;
141 aComponent : Axis2Placement from Geom;
142 aPlaneType : TypeOfPlane from AIS)
144 ---Purpose: Allows you to provide settings for the position and
145 -- direction of one of the plane's axes, aComponent, in
146 -- 3D space. The coordinate system used is
147 -- right-handed, and the type of plane aPlaneType is one of:
148 -- - AIS_ TOPL_Unknown
149 -- - AIS_ TOPL_XYPlane
150 -- - AIS_ TOPL_XZPlane
151 -- - AIS_ TOPL_YZPlane}.
153 Axis2Placement(me: mutable) returns Axis2Placement from Geom
155 ---Purpose: Returns the position of the plane's axis2 system
156 -- identifying the x, y, or z axis and giving the plane a
157 -- direction in 3D space. An axis2 system is a right-handed coordinate system.
159 TypeOfPlane (me : mutable) returns TypeOfPlane from AIS;
160 ---Purpose: Returns the type of plane - xy, yz, xz or unknown.
164 IsXYZPlane (me : mutable) returns Boolean from Standard;
165 ---Purpose: Returns the type of plane - xy, yz, or xz.
168 CurrentMode (me : mutable) returns Boolean from Standard;
169 ---Purpose: Returns the non-default current display mode set by SetCurrentMode.
172 SetCurrentMode (me : mutable; aCurrentMode : Boolean from Standard ) ;
174 -- Allows you to provide settings for a non-default
175 -- current display mode.
178 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard
179 is redefined virtual;
180 ---Purpose: Returns true if the display mode selected, aMode, is valid for planes.
182 SetContext(me:mutable; aCtx : InteractiveContext from AIS) is redefined;
183 ---Purpose: connection to <aCtx> default drawer implies a recomputation of Frame values.
185 TypeOfSensitivity (me) returns TypeOfSensitivity from Select3D;
187 ---Purpose: Returns the type of sensitivity for the plane;
189 SetTypeOfSensitivity (me: mutable;
190 theTypeOfSensitivity: TypeOfSensitivity from Select3D);
192 ---Purpose: Sets the type of sensitivity for the plane.
194 -- Methods from PresentableObject
196 Compute(me : mutable;
197 aPresentationManager: PresentationManager3d from PrsMgr;
198 aPresentation : Presentation from Prs3d;
199 aMode : Integer from Standard = 0)
200 is redefined virtual private;
203 aProjector: Projector from Prs3d;
204 aPresentation: Presentation from Prs3d)
205 is redefined virtual private;
207 Compute(me : mutable;
208 aProjector : Projector from Prs3d;
209 aTrsf : Transformation from Geom;
210 aPresentation : Presentation from Prs3d)
212 ---Purpose: computes the presentation according to a point of view
213 -- given by <aProjector>.
214 -- To be Used when the associated degenerated Presentations
215 -- have been transformed by <aTrsf> which is not a Pure
216 -- Translation. The HLR Prs can't be deducted automatically
217 -- WARNING :<aTrsf> must be applied
218 -- to the object to display before computation !!!
220 -- Methods from SelectableObject
222 ComputeSelection (me : mutable;
223 theSelection : Selection from SelectMgr;
224 theMode : Integer from Standard) is redefined virtual;
226 -- Methods from InteractiveObject
228 SetColor(me :mutable; aColor : NameOfColor from Quantity)
231 SetColor(me :mutable; aColor : Color from Quantity)
234 UnsetColor(me:mutable) is redefined static;
236 ComputeFrame(me: mutable)
239 ComputeFields(me: mutable)
242 InitDrawerAttributes(me:mutable) is private;
246 myComponent : Plane from Geom;
247 myAx2 : Axis2Placement from Geom;
248 myCenter : Pnt from gp;
249 myPmin : Pnt from gp;
250 myPmax : Pnt from gp;
251 myCurrentMode : Boolean from Standard;
252 myAutomaticPosition : Boolean from Standard;
253 myTypeOfPlane : TypeOfPlane from AIS;
254 myIsXYZPlane : Boolean from Standard;
255 myHasOwnSize : Boolean from Standard;
256 myTypeOfSensitivity: TypeOfSensitivity from Select3D;