2 -- Created: Wed Aug 2 16:18:48 1995
3 -- Author: Arnaud BOUZY/Odile Olivier
5 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
6 -- the restricted NameOfColor.
7 --Modified by rob Wed 11 feb 98 : add Size Methods
8 ---Copyright: Matra Datavision 1995
11 class Plane from AIS inherits InteractiveObject from AIS
13 ---Purpose: Constructs plane datums to be used in construction of
18 Presentation from Prs3d,
19 PresentationManager3d from PrsMgr,
20 NameOfColor from Quantity,
22 Selection from SelectMgr,
25 Transformation from Geom,
26 PresentationManager2d from PrsMgr,
27 GraphicObject from Graphic2d,
28 NameOfMaterial from Graphic3d,
30 Axis2Placement from Geom,
31 InteractiveContext from AIS,
32 KindOfInteractive from AIS
35 Create(aComponent : Plane from Geom;
36 aCurrentMode : Boolean from Standard = Standard_False)
37 returns mutable Plane from AIS;
38 ---Purpose: initializes the plane aComponent. If
39 -- the mode aCurrentMode equals true, the drawing
40 -- tool, "Drawer" is not initialized.
42 Create(aComponent : Plane from Geom;
43 aCenter : Pnt from gp;
44 aCurrentMode : Boolean from Standard = Standard_False)
45 returns mutable Plane from AIS;
46 --- Purpose: initializes the plane aComponent and
47 -- the point aCenter. If the mode aCurrentMode
48 -- equals true, the drawing tool, "Drawer" is not
49 -- initialized. aCurrentMode equals true, the drawing
50 -- tool, "Drawer" is not initialized.
52 Create(aComponent : Plane from Geom;
53 aCenter : Pnt from gp;
56 aCurrentMode : Boolean from Standard = Standard_False)
57 returns mutable Plane from AIS;
58 ---Purpose: initializes the plane aComponent, the
59 -- point aCenter, and the minimum and maximum
60 -- points, aPmin and aPmax. If the mode
61 -- aCurrentMode equals true, the drawing tool, "Drawer" is not initialized.
63 Create(aComponent : Axis2Placement from Geom;
64 aPlaneType : TypeOfPlane from AIS;
65 aCurrentMode : Boolean from Standard = Standard_False)
66 returns mutable Plane from AIS;
69 ---Category: Size Modifications...
71 SetSize(me:mutable;aValue:Real from Standard);
72 ---Purpose: Same value for x and y directions
74 SetSize(me:mutable;Xval,YVal:Real from Standard);
75 ---Purpose: Sets the size defined by the length along the X axis
76 -- XVal and the length along the Y axis YVal.
78 UnsetSize(me:mutable) ;
80 Size(me;X,Y:out Real from Standard) returns Boolean from Standard;
82 HasOwnSize(me) returns Boolean from Standard;
87 Signature(me) returns Integer from Standard is redefined;
89 Type(me) returns KindOfInteractive from AIS is redefined;
93 Component(me: mutable) returns Plane from Geom
95 ---Purpose: Returns the component specified in SetComponent.
99 SetComponent(me: mutable;aComponent : Plane from Geom) is static;
100 ---Purpose: Creates an instance of the plane aComponent.
102 PlaneAttributes(me: mutable;
103 aComponent : out Plane from Geom;
104 aCenter : out Pnt from gp;
105 aPmin : out Pnt from gp;
106 aPmax : out Pnt from gp)
107 returns Boolean from Standard;
108 ---Purpose: Returns the settings for the selected plane
109 -- aComponent, provided in SetPlaneAttributes.
110 -- These include the points aCenter, aPmin, and aPmax
112 SetPlaneAttributes(me: mutable;
113 aComponent : Plane from Geom;
114 aCenter : Pnt from gp;
118 ---Purpose: Allows you to provide settings other than default ones
119 -- for the selected plane. These include: center point
120 -- aCenter, maximum aPmax and minimum aPmin.
122 Center (me) returns Pnt from gp;
123 ---Purpose: Returns the coordinates of the center point.
125 ---C++: return const&
127 SetCenter (me: mutable; aCenter : Pnt from gp);
129 -- Provides settings for the center aCenter other than (0, 0, 0).
132 SetAxis2Placement(me: mutable;
133 aComponent : Axis2Placement from Geom;
134 aPlaneType : TypeOfPlane from AIS)
136 ---Purpose: Allows you to provide settings for the position and
137 -- direction of one of the plane's axes, aComponent, in
138 -- 3D space. The coordinate system used is
139 -- right-handed, and the type of plane aPlaneType is one of:
140 -- - AIS_ TOPL_Unknown
141 -- - AIS_ TOPL_XYPlane
142 -- - AIS_ TOPL_XZPlane
143 -- - AIS_ TOPL_YZPlane}.
145 Axis2Placement(me: mutable) returns Axis2Placement from Geom
147 ---Purpose: Returns the position of the plane's axis2 system
148 -- identifying the x, y, or z axis and giving the plane a
149 -- direction in 3D space. An axis2 system is a right-handed coordinate system.
151 TypeOfPlane (me : mutable) returns TypeOfPlane from AIS;
152 ---Purpose: Returns the type of plane - xy, yz, xz or unknown.
156 IsXYZPlane (me : mutable) returns Boolean from Standard;
157 ---Purpose: Returns the type of plane - xy, yz, or xz.
160 CurrentMode (me : mutable) returns Boolean from Standard;
161 ---Purpose: Returns the non-default current display mode set by SetCurrentMode.
164 SetCurrentMode (me : mutable; aCurrentMode : Boolean from Standard ) ;
166 -- Allows you to provide settings for a non-default
167 -- current display mode.
170 AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard
171 is redefined virtual;
172 ---Purpose: Returns true if the display mode selected, aMode, is valid for planes.
174 SetContext(me:mutable; aCtx : InteractiveContext from AIS) is redefined;
175 ---Purpose: connection to <aCtx> default drawer implies a recomputation of Frame values.
177 -- Methods from PresentableObject
179 Compute(me : mutable;
180 aPresentationManager: PresentationManager3d from PrsMgr;
181 aPresentation : mutable Presentation from Prs3d;
182 aMode : Integer from Standard = 0)
183 is redefined virtual private;
186 aProjector: Projector from Prs3d;
187 aPresentation: mutable Presentation from Prs3d)
188 is redefined virtual private;
191 aPresentationManager: PresentationManager2d from PrsMgr;
192 aPresentation: mutable GraphicObject from Graphic2d;
193 aMode: Integer from Standard = 0)
194 is redefined virtual private;
196 Compute(me : mutable;
197 aProjector : Projector from Prs3d;
198 aTrsf : Transformation from Geom;
199 aPresentation : mutable Presentation from Prs3d)
201 ---Purpose: computes the presentation according to a point of view
202 -- given by <aProjector>.
203 -- To be Used when the associated degenerated Presentations
204 -- have been transformed by <aTrsf> which is not a Pure
205 -- Translation. The HLR Prs can't be deducted automatically
206 -- WARNING :<aTrsf> must be applied
207 -- to the object to display before computation !!!
209 -- Methods from SelectableObject
211 ComputeSelection(me : mutable;
212 aSelection : mutable Selection from SelectMgr;
213 aMode : Integer from Standard) is redefined virtual;
215 -- Methods from InteractiveObject
217 SetColor(me :mutable; aColor : NameOfColor from Quantity)
220 SetColor(me :mutable; aColor : Color from Quantity)
223 UnsetColor(me:mutable) is redefined static;
225 ComputeFrame(me: mutable)
228 ComputeFields(me: mutable)
231 InitDrawerAttributes(me:mutable) is private;
235 myComponent : Plane from Geom;
236 myAx2 : Axis2Placement from Geom;
237 myCenter : Pnt from gp;
238 myPmin : Pnt from gp;
239 myPmax : Pnt from gp;
240 myCurrentMode : Boolean from Standard;
241 myAutomaticPosition : Boolean from Standard;
242 myTypeOfPlane : TypeOfPlane from AIS;
243 myIsXYZPlane : Boolean from Standard;
244 myHasOwnSize : Boolean from Standard;