0025373: Visualization, AIS_MultipleConnectedInteractive - transformation persistence...
[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-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 MultipleConnectedInteractive from AIS inherits InteractiveObject from AIS
18
19     
20     ---Purpose: Defines an Interactive Object by gathering together
21     -- several object presentations. This is done through a
22     -- list of interactive objects. These can also be
23     -- Connected objects. That way memory-costly
24     -- calculations of presentation are avoided.
25         
26         
27 uses
28
29
30     TypeOfPresentation3d   from PrsMgr,
31     InteractiveObject      from AIS,
32     Boolean                from Standard,
33     SequenceOfInteractive  from AIS,
34     KindOfInteractive      from AIS,
35     PresentationManager3d  from PrsMgr,
36     Presentation           from Prs3d,
37     Projector             from Prs3d,
38     Transformation        from Geom,
39     Integer                from Standard,
40     Selection              from SelectMgr,
41     Trsf                  from gp,
42     Pnt                   from gp,
43     TransModeFlags        from Graphic3d
44
45 is 
46
47     Create
48     returns  MultipleConnectedInteractive  from  AIS;
49     ---Purpose: Initializes the Interactive Object with multiple
50     -- connections to AIS_Interactive objects.
51
52     Connect (me             : mutable;
53              theInteractive : InteractiveObject from AIS)
54     returns InteractiveObject from AIS;
55     ---Purpose: Establishes the connection between the Connected Interactive Object, theInteractive, and its reference.
56     -- Copies local transformation and transformation persistence mode from theInteractive.
57     -- @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive)
58
59     Connect (me             : mutable;
60              theInteractive : InteractiveObject from AIS;
61              theLocation    : Trsf from gp)
62     returns InteractiveObject from AIS;
63     ---Purpose: Establishes the connection between the Connected Interactive Object, theInteractive, and its reference.
64     -- Locates instance in theLocation and copies transformation persistence mode from theInteractive.
65     -- @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive)
66
67     Connect (me               : mutable;
68              theInteractive   : InteractiveObject from AIS;
69              theLocation      : Trsf from gp;
70              theTrsfPersFlag  : TransModeFlags from Graphic3d;
71              theTrsfPersPoint : Pnt from gp )
72     returns InteractiveObject from AIS
73     is virtual;
74     ---Purpose: Establishes the connection between the Connected Interactive Object, theInteractive, and its reference.
75     -- Locates instance in theLocation and applies specified transformation persistence mode.
76     -- @return created instance object (AIS_ConnectedInteractive or AIS_MultipleConnectedInteractive)
77
78     Type(me) returns KindOfInteractive from AIS
79     is redefined virtual;         
80
81     Signature(me) returns Integer from Standard
82     is redefined virtual;
83
84     HasConnection(me) returns Boolean from Standard;
85     ---Purpose: Returns true if the object is connected to others.
86    
87     Disconnect(me             : mutable;
88                theInteractive : InteractiveObject from AIS);
89     ---Purpose:  Removes the connection with theInteractive.
90
91     DisconnectAll(me:mutable);
92     ---Purpose: Clears all the connections to objects.
93     
94     Compute(me:mutable;
95             aPresentationManager :         PresentationManager3d from PrsMgr;
96             aPresentation        : Presentation          from Prs3d;
97             aMode                :         Integer               from Standard = 0)
98     ---Level: Internal 
99     ---Purpose: this method is redefined virtual;
100     --          when the instance is connected to another
101     --          InteractiveObject,this method doesn't
102     --          compute anything, but just uses the 
103     --          presentation of this last object, with
104     --          a transformation if there's one stored. 
105     is redefined virtual protected; 
106
107     Compute(me            : mutable;
108             aProjector    : Projector from Prs3d;
109             aTrsf         : Transformation from Geom;
110             aPresentation : Presentation from Prs3d)
111     is redefined;
112     ---Purpose: computes the presentation according to a point of view
113     --          given by <aProjector>. 
114     --          To be Used when the associated degenerated Presentations 
115     --          have been transformed by <aTrsf> which is not a Pure
116     --          Translation. The HLR Prs can't be deducted automatically
117     --          WARNING :<aTrsf> must be applied
118     --           to the object to display before computation  !!!
119
120     Compute(me:mutable;
121                 aProjector: Projector from Prs3d;
122                 aPresentation: Presentation from Prs3d)
123     is redefined ;
124
125     AcceptShapeDecomposition(me) returns Boolean from Standard is redefined virtual;
126         ---Purpose:  Informs the graphic context that the interactive Object
127         -- may be decomposed into sub-shapes for dynamic selection.
128
129
130     ComputeSelection(me:mutable; aSelection : Selection from SelectMgr;
131                                  aMode      :        Integer   from Standard)
132     is redefined virtual private;
133         ---Purpose:  Computes the selection for whole subtree in scene hierarchy.
134
135
136
137     
138 end MultipleConnectedInteractive;