1 -- File: AIS_ConnectedShape.cdl
2 -- Created: Wed Jan 8 17:57:55 1997
3 -- Author: Robert COUBLANC
4 -- <rob@robox.paris1.matra-dtv.fr>
5 --Modified by rob on Jul-28-97
6 ---Copyright: Matra Datavision 1997
9 class ConnectedShape from AIS inherits ConnectedInteractive from AIS
11 ---Purpose: Constructs a Connected Interactive Object with an
12 -- AIS_Shape presentation as its reference Interactive Object.
13 -- In topological decomposition of the shape, this class
14 -- assigns the same owners to the sensitive primitives
15 -- as those in AIS_Shape. Like AIS_Shape, it allows a
16 -- presentation of hidden parts. These are calculated
17 -- automatically from the shape of its reference entity.
25 Presentation from Prs3d,
26 Selection from SelectMgr,
27 Integer from Standard,
29 TypeOfPresentation3d from PrsMgr,
30 GraphicObject from Graphic2d,
31 PresentationManager3d from PrsMgr,
32 PresentationManager2d from PrsMgr,
33 InteractiveObject from AIS,
34 KindOfInteractive from AIS,
36 Transformation from Geom
38 NotImplemented from Standard
42 Create (aTypeOfPresentation : TypeOfPresentation3d from PrsMgr
43 =PrsMgr_TOP_ProjectorDependant)
44 returns mutable ConnectedShape from AIS;
45 ---Purpose: Initializes the type of 3d presentation aTypeOfPresentation
47 Create (aInteractiveShape : Shape from AIS;
48 aTypeOfPresentation : TypeOfPresentation3d from PrsMgr
49 =PrsMgr_TOP_ProjectorDependant)
50 returns mutable ConnectedShape from AIS;
51 ---Purpose: Initializes the entity aInteractiveShape and the type of 3d presentation aTypeOfPresentation.
53 Create(aConnectedShape : ConnectedShape from AIS;
54 aTypeOfPresentation : TypeOfPresentation3d from PrsMgr
55 =PrsMgr_TOP_ProjectorDependant)
56 returns mutable ConnectedShape from AIS;
57 ---Purpose: Initializes the entity aConnectedShape and the type of 3d presentation aTypeOfPresentation.
59 ---Category: Redefined methods...
61 Type(me) returns KindOfInteractive from AIS
64 Signature(me) returns Integer from Standard
67 AcceptShapeDecomposition(me)
68 returns Boolean from Standard is redefined;
74 anotherIObj : InteractiveObject from AIS) is redefined ;
75 ---Purpose: Establishes the connection between the Connected
76 -- Interactive Object, anotherIobj, and its reference
77 -- entity. If there is already a previous connection with
78 -- an Interactive Object, this connection is removed.
81 anotherIobj: InteractiveObject from AIS;
82 aLocation : Location from TopLoc) is redefined;
83 ---Purpose: Establishes the connection between the Connected
84 -- Interactive Object, anotherIobj, and its reference
85 -- entity. If there is already a previous connection with
86 -- an Interactive Object, this connection is removed.
87 -- This syntax also initiates the location of the Connected Interactive Object.
91 aProjector : Projector from Prs3d;
92 aPresentation: mutable Presentation from Prs3d)
93 is redefined virtual private;
96 aProjector : Projector from Prs3d;
97 aTrsf : Transformation from Geom;
98 aPresentation : mutable Presentation from Prs3d)
99 is redefined virtual private;
101 Compute(me : mutable;
102 aPresentationManager : PresentationManager3d from PrsMgr;
103 aPresentation : mutable Presentation from Prs3d;
104 aMode : Integer from Standard = 0)
106 ---Purpose: this method is redefined virtual;
107 -- when the instance is connected to another
108 -- InteractiveObject,this method doesn't
109 -- compute anything, but just uses the
110 -- presentation of this last object, with
111 -- a transformation if there's one stored.
116 ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
117 aMode : Integer from Standard)
118 is redefined virtual private;
120 -- Recovers and calculates any sensitive primitive,
121 -- aSelection, available in Shape mode, specified by
122 -- aMode . As a rule, these are sensitive faces.
123 -- This method is defined as virtual. This enables you to
124 -- implement it in the creation of a new class of
125 -- Interactive Object. You need to do this and in so
126 -- doing, redefine this method, if you create a class
127 -- which enriches the list of signatures and types.
130 aPresentationManager: PresentationManager2d from PrsMgr;
131 aPresentation: mutable GraphicObject from Graphic2d;
132 aMode: Integer from Standard = 0)
134 ---Purpose: this method should fill the presentation according to the
135 -- enumerated mode of the application and to the display parameter
136 -- of the application.
138 raises NotImplemented from Standard
141 Shape(me:mutable) returns Shape from TopoDS;
142 ---C++: return const&
143 ---Purpose: Returns the topological shape which is the reference
144 -- for the connected shape. Sets hilight mode to index
145 -- 0. This returns a wireframe presentation.
148 UpdateShape(me:mutable;WithLocation:Boolean from Standard = Standard_True)
152 aProjector : Projector from Prs3d;
153 aPresentation: mutable Presentation from Prs3d;
154 aShape : Shape from TopoDS)
160 myOwnSh : Shape from TopoDS; -- used for HLR and selection...