1 -- File: AIS_Circle.cdl
2 -- Created: Tue Jan 21 11:45:01 1997
3 -- Author: Prestataire Christiane ARMAND
4 -- <car@chamalox.paris1.matra-dtv.fr>
5 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
6 -- the restricted NameOfColor.
7 ---Copyright: Matra Datavision 1997
9 class Circle from AIS inherits InteractiveObject from AIS
11 ---Purpose: Constructs circle datums to be used in construction of
17 Presentation from Prs3d,
18 PresentationManager3d from PrsMgr,
19 NameOfColor from Quantity,
21 Selection from SelectMgr,
23 Transformation from Geom,
24 PresentationManager2d from PrsMgr,
25 GraphicObject from Graphic2d,
27 KindOfInteractive from AIS
31 Create(aCircle : Circle from Geom)
32 returns mutable Circle from AIS;
33 ---Purpose: Initializes this algorithm for constructing AIS circle
34 -- datums initializes the circle aCircle
35 Create(aCircle : Circle from Geom;
36 aUStart : Real from Standard;
37 aUEnd : Real from Standard;
38 aSens : Boolean from Standard = Standard_True)
39 returns mutable Circle from AIS;
40 ---Purpose: Initializes this algorithm for constructing AIS circle datums.
41 -- Initializes the circle aCircle, the arc
42 -- starting point UStart, the arc ending point UEnd,
43 -- and the direction aSens.
46 aPresentationManager: PresentationManager3d from PrsMgr;
47 aPresentation : mutable Presentation from Prs3d;
48 aMode : Integer from Standard = 0)
49 is redefined static private;
52 aProjector: Projector from Prs3d;
53 aPresentation: mutable Presentation from Prs3d)
54 is redefined static private;
57 aPresentationManager: PresentationManager2d from PrsMgr;
58 aPresentation: mutable GraphicObject from Graphic2d;
59 aMode: Integer from Standard = 0)
60 is redefined static private;
63 aProjector : Projector from Prs3d;
64 aTrsf : Transformation from Geom;
65 aPresentation : mutable Presentation from Prs3d)
67 ---Purpose: computes the presentation according to a point of view
68 -- given by <aProjector>.
69 -- To be Used when the associated degenerated Presentations
70 -- have been transformed by <aTrsf> which is not a Pure
71 -- Translation. The HLR Prs can't be deducted automatically
72 -- WARNING :<aTrsf> must be applied
73 -- to the object to display before computation !!!
75 -- Methods from SelectableObject
77 ComputeSelection(me : mutable;
78 aSelection : mutable Selection from SelectMgr;
79 aMode : Integer from Standard)is private;
82 -- Methods from InteractiveObject
85 Signature(me) returns Integer from Standard is redefined;
87 ---Purpose: Returns index 6 by default.
89 Type(me) returns KindOfInteractive from AIS is redefined;
91 ---Purpose: Indicates that the type of Interactive Object is a datum.
93 Circle(me) returns any Circle from Geom;
95 ---C++: return const &
96 ---Purpose: Returns the circle component defined in SetCircle.
98 Parameters(me; u1,u2 : in out Real from Standard);
101 -- Constructs instances of the starting point and the end
102 -- point parameters, u1 and u2.
104 SetCircle(me:mutable;aCircle : Circle from Geom);
106 ---Purpose: Allows you to provide settings for the circle datum aCircle.
108 SetFirstParam(me:mutable;u:Real);
110 ---Purpose: Allows you to set the parameter u for the starting point of an arc.
112 SetLastParam(me:mutable;u:Real);
114 ---Purpose: Allows you to provide the parameter u for the end point of an arc.
116 SetColor(me :mutable; aColor : NameOfColor from Quantity)
118 --- Purpose: Assigns the color aColor to the solid line boundary of the circle datum.
119 SetColor(me :mutable; aColor : Color from Quantity)
122 SetWidth(me:mutable; aValue:Real from Standard)
124 ---Purpose: Assigns the width aValue to the solid line boundary of the circle datum.
125 UnsetColor(me:mutable)
127 ---Purpose: Removes color from the solid line boundary of the circle datum.
128 UnsetWidth(me:mutable)
130 ---Purpose: Removes width settings from the solid line boundary of the circle datum.
133 ComputeCircle(me: mutable;
134 aPresentation : mutable Presentation from Prs3d)
137 ComputeArc(me: mutable;
138 aPresentation : mutable Presentation from Prs3d)
141 ComputeCircleSelection(me: mutable;
142 aSelection : mutable Selection from SelectMgr)
145 ComputeArcSelection(me: mutable;
146 aSelection : mutable Selection from SelectMgr)
151 myComponent : Circle from Geom;
152 myUStart : Real from Standard;
153 myUEnd : Real from Standard;
154 myCircleIsArc : Boolean from Standard;
155 mySens : Boolean from Standard;