4efdf2587deae05a60faabc03105b0b984be90f2
[occt.git] / src / AIS / AIS_ConnectedShape.cdl
1 -- Created on: 1997-01-08
2 -- Created by: Robert COUBLANC
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 --Modified by rob on Jul-28-97          
22
23
24 class ConnectedShape from AIS inherits ConnectedInteractive from AIS
25
26         ---Purpose: Constructs a Connected Interactive Object with an
27         -- AIS_Shape presentation as its reference Interactive Object.
28         -- In topological decomposition of the shape, this class
29         -- assigns the same owners to the sensitive primitives
30         -- as those in AIS_Shape. Like AIS_Shape, it allows a
31         -- presentation of hidden parts. These are calculated
32         -- automatically from the shape of its reference entity.
33
34     
35
36 uses
37
38     Shape                from TopoDS,
39     Projector            from Prs3d,
40     Presentation         from Prs3d,
41     Selection            from SelectMgr,
42     Integer              from Standard,
43     Shape                from AIS,
44     TypeOfPresentation3d from PrsMgr,
45     PresentationManager3d from PrsMgr,
46     InteractiveObject    from AIS,
47     KindOfInteractive    from AIS,
48     Location             from TopLoc,
49     Transformation       from Geom
50 raises
51     NotImplemented from Standard
52
53 is
54
55     Create (aTypeOfPresentation : TypeOfPresentation3d from PrsMgr 
56                                   =PrsMgr_TOP_ProjectorDependant) 
57     returns mutable  ConnectedShape  from  AIS;
58         ---Purpose: Initializes the type of 3d presentation aTypeOfPresentation
59         
60     Create (aInteractiveShape   : Shape from AIS;
61             aTypeOfPresentation : TypeOfPresentation3d from PrsMgr 
62                                   =PrsMgr_TOP_ProjectorDependant)  
63     returns  mutable  ConnectedShape  from  AIS;
64         ---Purpose: Initializes the entity aInteractiveShape and the type of 3d presentation aTypeOfPresentation.
65
66     Create(aConnectedShape     : ConnectedShape from AIS;
67            aTypeOfPresentation : TypeOfPresentation3d from PrsMgr 
68                                 =PrsMgr_TOP_ProjectorDependant)  
69     returns  mutable  ConnectedShape  from  AIS;
70         ---Purpose: Initializes the entity aConnectedShape and the type of 3d presentation aTypeOfPresentation.
71     
72     ---Category:  Redefined methods...
73
74     Type(me) returns KindOfInteractive from AIS
75     is redefined virtual;
76
77     Signature(me) returns Integer from Standard
78     is redefined virtual;
79
80     AcceptShapeDecomposition(me) 
81     returns Boolean from Standard is redefined;
82
83
84
85            
86     Connect(me          : mutable; 
87             anotherIObj : InteractiveObject from AIS) is redefined ;
88         ---Purpose:  Establishes the connection between the Connected
89         -- Interactive Object, anotherIobj, and its reference
90         -- entity. If there is already a previous connection with
91         -- an Interactive Object, this connection is removed.
92
93     Connect(me:mutable;
94             anotherIobj: InteractiveObject from AIS;
95             aLocation : Location from TopLoc) is redefined;
96         ---Purpose: Establishes the connection between the Connected
97         -- Interactive Object, anotherIobj, and its reference
98         -- entity. If there is already a previous connection with
99         -- an Interactive Object, this connection is removed.
100         -- This syntax also initiates the location of the Connected Interactive Object.
101
102
103     Compute(me:mutable;
104                 aProjector   :         Projector    from Prs3d;
105                 aPresentation: mutable Presentation from Prs3d)
106     is redefined virtual private;
107  
108     Compute(me                   : mutable;
109             aProjector           : Projector from Prs3d;
110             aTrsf                : Transformation from Geom;
111             aPresentation        : mutable Presentation from Prs3d)
112     is redefined virtual private;
113
114     ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
115                                  aMode      :        Integer   from Standard)
116     is redefined virtual private;
117         ---Purpose: Generates sensitive entities by copying 
118         -- them from myReferense selection specified by aMode,  
119         -- creates and sets an entity owner for this entities and adds 
120         -- them to aSelection.
121     
122     Shape(me:mutable) returns Shape from TopoDS;
123         ---C++: return const&
124         ---Purpose: Returns the topological shape which is the reference
125         -- for the connected shape. Sets hilight mode to index
126         -- 0. This returns a wireframe presentation.
127         
128
129     UpdateShape(me:mutable;WithLocation:Boolean from Standard = Standard_True)
130     is static private;
131     
132     Compute(me:mutable;
133                 aProjector   :         Projector    from Prs3d;
134                 aPresentation: mutable Presentation from Prs3d;
135                 aShape       :         Shape from TopoDS)
136     is  private;
137
138     
139 fields
140     
141     myOwnSh : Shape   from TopoDS; -- used for HLR and selection...
142     
143 end ConnectedShape;