0025765: Coding rules - clean up code from obsolete macro checks
[occt.git] / src / AIS / AIS_Circle.cdl
1 -- Created on: 1997-01-21
2 -- Created by: Prestataire Christiane ARMAND
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Circle from AIS inherits InteractiveObject from AIS
18
19         ---Purpose: Constructs circle datums to be used in construction of
20         -- composite shapes.
21
22 uses 
23     Circle                from Geom,
24     Point                 from Geom,
25     Presentation          from Prs3d,
26     PresentationManager3d from PrsMgr,
27     NameOfColor           from Quantity,
28     Color                         from Quantity,
29     Selection             from SelectMgr,
30     Projector             from Prs3d,
31     Transformation        from Geom,
32     Line                  from AIS,
33     KindOfInteractive from AIS
34     
35
36 is
37     Create(aCircle : Circle from Geom) 
38     returns Circle from AIS;
39         ---Purpose: Initializes this algorithm for constructing AIS circle
40         -- datums initializes the circle aCircle
41     Create(theCircle : Circle from Geom;
42            theUStart : Real from Standard;
43            theUEnd   : Real from Standard;
44            theIsFilledCircleSens : Boolean from Standard = Standard_False) 
45     returns Circle from AIS;
46     ---Purpose: Initializes this algorithm for constructing AIS circle datums.    
47     -- Initializes the circle theCircle, the arc
48     --   starting point theUStart, the arc ending point theUEnd,
49     --   and the type of sensitivity theIsFilledCircleSens.
50
51     Compute(me            : mutable;
52             aPresentationManager: PresentationManager3d from PrsMgr;
53             aPresentation : Presentation from Prs3d;
54             aMode         : Integer from Standard = 0) 
55     is redefined static  private;
56     
57     Compute(me:mutable;
58                 aProjector: Projector from Prs3d;
59                 aPresentation: Presentation from Prs3d)
60     is redefined static private;     
61
62     Compute(me            : mutable;
63             aProjector    : Projector from Prs3d;
64             aTrsf         : Transformation from Geom;
65             aPresentation : Presentation from Prs3d)
66     is redefined;
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  !!!
74
75 -- Methods from SelectableObject
76
77     ComputeSelection(me         : mutable;
78                      aSelection : Selection from SelectMgr;
79                      aMode      : Integer from Standard)is private;
80
81  
82 -- Methods from InteractiveObject
83
84   
85   Signature(me) returns Integer from Standard is redefined;
86          ---C++: inline
87          ---Purpose: Returns index 6 by default.
88   
89   Type(me) returns KindOfInteractive from AIS is redefined;
90          ---C++: inline
91          ---Purpose: Indicates that the type of Interactive Object is a datum.
92   
93   Circle(me) returns any Circle from Geom;
94          ---C++: inline
95          ---C++: return const & 
96          ---Purpose: Returns the circle component defined in SetCircle.
97    
98   Parameters(me; u1,u2 : in out Real from Standard);
99          ---C++: inline
100          ---Purpose:
101          -- Constructs instances of the starting point and the end
102          -- point parameters, u1 and u2.
103  
104   SetCircle(me:mutable;aCircle : Circle from Geom);
105          ---C++: inline
106          ---Purpose: Allows you to provide settings for the circle datum aCircle.
107   
108   SetFirstParam(me:mutable;u:Real);
109          ---C++: inline
110          ---Purpose: Allows you to set the parameter u for the starting point of an arc.
111   
112   SetLastParam(me:mutable;u:Real);
113          ---C++: inline
114          ---Purpose: Allows you to provide the parameter u for the end point of an arc.
115
116     SetColor(me :mutable; aColor : NameOfColor from Quantity)
117     is redefined static;
118         --- Purpose: Assigns the color aColor to the solid line boundary of the circle datum.
119     SetColor(me :mutable; aColor : Color from Quantity)
120     is redefined static;
121          
122     SetWidth(me:mutable; aValue:Real from Standard)
123     is redefined static; 
124         ---Purpose: Assigns the width aValue to the solid line boundary of the circle datum.
125     UnsetColor(me:mutable)
126     is redefined static; 
127         ---Purpose: Removes color from the solid line boundary of the circle datum.    
128     UnsetWidth(me:mutable)    
129     is redefined static; 
130         ---Purpose: Removes width settings from the solid line boundary of the circle datum.
131
132     IsFilledCircleSens (me) returns Boolean from Standard;
133     ---C++: inline
134     ---Purpose: Returns the type of sensitivity for the circle;
135
136     SetFilledCircleSens (me: mutable;
137                          theIsFilledCircleSens : Boolean from Standard);
138     ---C++: inline
139     ---Purpose: Sets the type of sensitivity for the circle. If theIsFilledCircleSens set to Standard_True
140     -- then the whole circle will be detectable, otherwise only the boundary of the circle.
141
142     ComputeCircle(me: mutable;
143                   aPresentation : Presentation from Prs3d)
144     is private;
145      
146     ComputeArc(me: mutable;
147                aPresentation : Presentation from Prs3d)
148     is private;
149
150     ComputeCircleSelection(me: mutable;
151                            aSelection : Selection from SelectMgr)
152     is private;
153      
154     ComputeArcSelection(me: mutable;
155                         aSelection : Selection from SelectMgr)
156     is private;
157
158 fields
159
160     myComponent   : Circle  from Geom;
161     myUStart      : Real    from Standard;
162     myUEnd        : Real    from Standard;
163     myCircleIsArc : Boolean from Standard;
164     myIsFilledCircleSens : Boolean from Standard;
165     
166 end Circle ;