0023432: Connected Interactive Objects computed without Interactive Context
[occt.git] / src / AIS / AIS_MultipleConnectedInteractive.cdl
1 -- Created on: 1997-04-22
2 -- Created by: Guest Design
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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.
10 --
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.
13 --
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.
20
21
22 class MultipleConnectedInteractive from AIS inherits InteractiveObject from AIS
23
24     
25     ---Purpose: Defines an Interactive Object by gathering together
26     -- several object presentations. This is done through a
27     -- list of interactive objects. These can also be
28     -- Connected objects. That way memory-costly
29     -- calculations of presentation are avoided.
30         
31         
32 uses
33
34
35     TypeOfPresentation3d   from PrsMgr,
36     InteractiveObject      from AIS,
37     Boolean                from Standard,
38     SequenceOfInteractive  from AIS,
39     KindOfInteractive      from AIS,
40     PresentationManager3d  from PrsMgr,
41     PresentationManager2d from PrsMgr,
42     GraphicObject         from Graphic2d,    
43     Presentation           from Prs3d,
44     Projector             from Prs3d,
45     Transformation        from Geom,
46     Integer                from Standard,
47     Selection              from SelectMgr
48
49 is 
50     
51
52     Create (aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView) 
53     returns  mutable  MultipleConnectedInteractive  from  AIS;
54     ---Purpose: Initializes the Interactive Object with multiple
55     -- presentation connections. If aTypeOfPresentation3d
56     -- does not have the affectation PrsMgr_TOP_AllView,
57     -- it is projector dependent.
58     
59     Connect(me          : mutable; 
60             anotherIObj : InteractiveObject from AIS);
61     ---Purpose: Add anotherIObj in the presentation of me
62
63
64     Type(me) returns KindOfInteractive from AIS
65     is redefined virtual;         
66
67     Signature(me) returns Integer from Standard
68     is redefined virtual;
69
70     HasConnection(me) returns Boolean from Standard;
71     ---Purpose: Returns true if the object is connected to others.
72    
73      ConnectedTo(me) returns SequenceOfInteractive from AIS;
74      ---Purpose:
75      -- Returns the connection references of the previous
76      -- Interactive Objects in view.
77      ---C++: inline
78      ---C++: return const&
79
80     Disconnect(me:mutable;
81                anotherIObj : InteractiveObject from AIS);
82     ---Purpose:  Removes the connection anotherIObj to an entity.
83
84     DisconnectAll(me:mutable);
85     ---Purpose: Clears all the connections to objects.
86     
87     Compute(me:mutable;
88             aPresentationManager :         PresentationManager3d from PrsMgr;
89             aPresentation        : mutable Presentation          from Prs3d;
90             aMode                :         Integer               from Standard = 0)
91     ---Level: Internal 
92     ---Purpose: this method is redefined virtual;
93     --          when the instance is connected to another
94     --          InteractiveObject,this method doesn't
95     --          compute anything, but just uses the 
96     --          presentation of this last object, with
97     --          a transformation if there's one stored. 
98     is redefined virtual protected; 
99
100     Compute(me:mutable;
101             aPresentationManager: PresentationManager2d from PrsMgr;
102             aPresentation: mutable GraphicObject from Graphic2d;
103             aMode: Integer from Standard = 0)
104     is redefined;       
105
106     Compute(me            : mutable;
107             aProjector    : Projector from Prs3d;
108             aTrsf         : Transformation from Geom;
109             aPresentation : mutable Presentation from Prs3d)
110     is redefined;
111     ---Purpose: computes the presentation according to a point of view
112     --          given by <aProjector>. 
113     --          To be Used when the associated degenerated Presentations 
114     --          have been transformed by <aTrsf> which is not a Pure
115     --          Translation. The HLR Prs can't be deducted automatically
116     --          WARNING :<aTrsf> must be applied
117     --           to the object to display before computation  !!!
118
119     Compute(me:mutable;
120                 aProjector: Projector from Prs3d;
121                 aPresentation: mutable Presentation from Prs3d)
122     is redefined ;     
123
124     ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
125                                  aMode      :        Integer   from Standard)
126     is redefined virtual private;
127
128
129
130 fields
131
132     myReferences         : SequenceOfInteractive from AIS;
133     myPreviousReferences : SequenceOfInteractive from AIS;
134     
135 end MultipleConnectedInteractive;