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
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.
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.
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.
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
26 class Plane from AIS inherits InteractiveObject from AIS
28 ---Purpose: Constructs plane datums to be used in construction of
33 Presentation from Prs3d,
34 PresentationManager3d from PrsMgr,
35 NameOfColor from Quantity,
37 Selection from SelectMgr,
40 Transformation from Geom,
41 NameOfMaterial from Graphic3d,
43 Axis2Placement from Geom,
44 InteractiveContext from AIS,
45 KindOfInteractive from AIS
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.
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.
65 Create(aComponent : Plane from Geom;
66 aCenter : 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.
76 Create(aComponent : Axis2Placement from Geom;
77 aPlaneType : TypeOfPlane from AIS;
78 aCurrentMode : Boolean from Standard = Standard_False)
79 returns mutable Plane from AIS;
82 ---Category: Size Modifications...
84 SetSize(me:mutable;aValue:Real from Standard);
85 ---Purpose: Same value for x and y directions
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.
91 UnsetSize(me:mutable) ;
93 Size(me;X,Y:out Real from Standard) returns Boolean from Standard;
95 HasOwnSize(me) returns Boolean from Standard;
100 Signature(me) returns Integer from Standard is redefined;
102 Type(me) returns KindOfInteractive from AIS is redefined;
106 Component(me: mutable) returns Plane from Geom
108 ---Purpose: Returns the component specified in SetComponent.
110 ---C++: return const&
112 SetComponent(me: mutable;aComponent : Plane from Geom) is static;
113 ---Purpose: Creates an instance of the plane aComponent.
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
125 SetPlaneAttributes(me: mutable;
126 aComponent : Plane from Geom;
127 aCenter : Pnt from gp;
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.
135 Center (me) returns Pnt from gp;
136 ---Purpose: Returns the coordinates of the center point.
138 ---C++: return const&
140 SetCenter (me: mutable; aCenter : Pnt from gp);
142 -- Provides settings for the center aCenter other than (0, 0, 0).
145 SetAxis2Placement(me: mutable;
146 aComponent : Axis2Placement from Geom;
147 aPlaneType : TypeOfPlane from AIS)
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}.
158 Axis2Placement(me: mutable) returns Axis2Placement from Geom
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.
164 TypeOfPlane (me : mutable) returns TypeOfPlane from AIS;
165 ---Purpose: Returns the type of plane - xy, yz, xz or unknown.
169 IsXYZPlane (me : mutable) returns Boolean from Standard;
170 ---Purpose: Returns the type of plane - xy, yz, or xz.
173 CurrentMode (me : mutable) returns Boolean from Standard;
174 ---Purpose: Returns the non-default current display mode set by SetCurrentMode.
177 SetCurrentMode (me : mutable; aCurrentMode : Boolean from Standard ) ;
179 -- Allows you to provide settings for a non-default
180 -- current display mode.
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.
187 SetContext(me:mutable; aCtx : InteractiveContext from AIS) is redefined;
188 ---Purpose: connection to <aCtx> default drawer implies a recomputation of Frame values.
190 -- Methods from PresentableObject
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;
199 aProjector: Projector from Prs3d;
200 aPresentation: mutable Presentation from Prs3d)
201 is redefined virtual private;
203 Compute(me : mutable;
204 aProjector : Projector from Prs3d;
205 aTrsf : Transformation from Geom;
206 aPresentation : mutable Presentation from Prs3d)
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 !!!
216 -- Methods from SelectableObject
218 ComputeSelection(me : mutable;
219 aSelection : mutable Selection from SelectMgr;
220 aMode : Integer from Standard) is redefined virtual;
222 -- Methods from InteractiveObject
224 SetColor(me :mutable; aColor : NameOfColor from Quantity)
227 SetColor(me :mutable; aColor : Color from Quantity)
230 UnsetColor(me:mutable) is redefined static;
232 ComputeFrame(me: mutable)
235 ComputeFields(me: mutable)
238 InitDrawerAttributes(me:mutable) is private;
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;