0024624: Lost word in license statement in source files
[occt.git] / src / AIS / AIS_ConnectedInteractive.cdl
CommitLineData
b311480e 1-- Created on: 1997-01-08
2-- Created by: Robert COUBLANC
3-- Copyright (c) 1997-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
17class ConnectedInteractive from AIS inherits InteractiveObject from AIS
7fd59977 18
19 ---Purpose: Defines an Interactive Object through a connection to
20 -- another Interactive Object, which serves as a
21 -- reference, and which is located elsewhere in the viewer.
22 -- This allows you to use the Connected Interactive
23 -- Object without having to recalculate presentation,
24 -- selection or graphic structure. These are deduced
25 -- from your reference object.
26 -- The relation between the connected interactive object
ac04d101
SA
27 -- and its source is generally one of geometric transformation.
28 -- AIS_ConnectedInteractive class doesn't support selection
29 -- modes different from 0. Descendants should redefine ComputeSelection()
30 -- method in order to handle other selection modes and generate connected
31 -- sensitive entities properly. Refer to AIS_ConnectedShape class
32 -- for exisiting implementation of a connected interactive object
33 -- for AIS_Shape that supports all standard sub-shape selection modes.
7fd59977 34 -- Warning
35 -- An Interactive entity which is view (or projector)
36 -- dependent requires recalculation of views in hidden
37 -- parts mode depending on the position of the
38 -- projector in each view. You should derive the entity's
39 -- inheritance from ConnectedInteractive and redefine
40 -- its compute method to enable this type of calculation.
41
42uses
43 Location from TopLoc,
44 Transformation from Geom,
45 PresentationManager3d from PrsMgr,
7fd59977 46 Presentation from Prs3d,
47 TypeOfPresentation3d from PrsMgr,
48 Selection from SelectMgr,
49 Projector from Prs3d,
50 KindOfInteractive from AIS
51raises
52 NotImplemented from Standard
53
54is
55
56 Create (aTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr = PrsMgr_TOP_AllView)
57 returns mutable ConnectedInteractive from AIS;
58 ---Purpose:
59 -- Disconnects the previous view and sets highlight
60 -- mode to 0. This highlights the wireframe presentation
61 -- aTypeOfPresentation3d.
62 -- Top_AllView deactivates hidden line removal.
63
64 Type(me) returns KindOfInteractive from AIS
65 is redefined virtual;
66 ---Purpose: Returns KOI_Object
67
68 Signature(me) returns Integer from Standard
69 is redefined virtual;
70 ---Purpose: Returns 1
71
72
73 Connect(me : mutable;
74 anotherIObj : InteractiveObject from AIS) is virtual;
75 ---Purpose: Establishes the connection between the Connected
76 -- Interactive Object, anotherIobj, and its reference
77 -- entity. If a previous connection with an Interactive
78 -- Object already exists, it is removed by Disconnect.
79 -- The second syntax also initiates the location of the
80 -- Connected Interactive Object.
81
82 Connect(me:mutable;
83 anotherIobj: InteractiveObject from AIS;
84 aLocation : Location from TopLoc) is virtual;
85 ---Purpose:
86
87
88 HasConnection(me) returns Boolean from Standard;
89 ---C++: inline
90 ---Purpose:
91 -- Returns true if there is a connection established
92 -- between the presentation and its source reference.
93
94 ConnectedTo(me) returns any InteractiveObject from AIS;
95 ---C++: inline
96 ---C++: return const&
97 ---Purpose:
98 -- Returns the connection with the reference Interactive Object.
99
100
101 Disconnect(me:mutable);
102 ---Purpose: Clears the connection with a source reference. The
103 -- presentation will no longer be displayed.
104 -- Warning Must be done before deleting the presentation.
105
106 Compute(me : mutable;
107 aPresentationManager : PresentationManager3d from PrsMgr;
108 aPresentation : mutable Presentation from Prs3d;
109 aMode : Integer from Standard = 0)
110 ---Level: Public
111 ---Purpose: Calculates the view aPresentation and its updates.
112 -- The latter are managed by aPresentationManager.
113 -- The display mode aMode is 0 by default.
114 -- this method is redefined virtual;
115 -- when the instance is connected to another
116 -- InteractiveObject,this method doesn't
117 -- compute anything, but just uses the
118 -- presentation of this last object, with
119 -- a transformation if there's one stored.
120 is redefined virtual private;
121
122 Compute(me : mutable;
123 aProjector : Projector from Prs3d;
124 aTrsf : Transformation from Geom;
125 aPresentation : mutable Presentation from Prs3d)
126 is redefined;
127 ---Purpose: Computes the presentation according to a point of view
128 -- given by <aProjector>.
129 -- To be Used when the associated degenerated Presentations
130 -- have been transformed by <aTrsf> which is not a Pure
131 -- Translation. The HLR Prs can't be deducted automatically
132 -- WARNING :<aTrsf> must be applied
133 -- to the object to display before computation !!!
134
135
136 Compute(me:mutable;
137 aProjector: Projector from Prs3d;
138 aPresentation: mutable Presentation from Prs3d)
139 is redefined;
7fd59977 140
141 ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
142 aMode : Integer) is redefined virtual private;
143 ---Level: Public
ac04d101
SA
144 ---Purpose: Generates sensitive entities by copying
145 -- them from myReference selection, creates and sets an entity
146 -- owner for this entities and adds them to aSelection
7fd59977 147
148 AcceptShapeDecomposition(me) returns Boolean from Standard is
149 redefined virtual;
150 ---C++: inline
151
152
153 UpdateLocation(me:mutable) is redefined virtual;
154
155 UpdateLocation(me:mutable;aSel:Selection from SelectMgr) is redefined virtual;
156 ---Purpose: For this class, the location effect is treated in the
157 -- compute & computeSelection methods. So the
158 -- UpdateLocation Methods are redefined to do nothing else
159
160-- UpdateLocation(me:mutable;P : mutable Presentation from Prs3d) is redefined virtual;
161
162fields
163
164 myReference : InteractiveObject from AIS is protected;
165 ---Purpose: To have the time to Disconnect below, the old is kept for a while.
166 myOldReference : InteractiveObject from AIS is protected;
167
168end ConnectedInteractive;
169
170