1 -- File : MeshVS_PrsBuilder.cdl
2 -- Created : 10 October 2003
3 -- Author : Alexander SOLOVYOV
4 ---Copyright: Open CASCADE 2003
7 deferred class PrsBuilder from MeshVS inherits TShared from MMgt
9 ---Purpose: This class is parent for all builders using in MeshVS_Mesh.
10 -- It provides base fields and methods all buildes need.
13 Integer from Standard,
14 Boolean from Standard,
16 Presentation from Prs3d,
18 EntityOwner from SelectBasics,
19 SensitiveEntity from SelectBasics,
21 DisplayModeFlags from MeshVS,
24 DataSource from MeshVS,
26 BuilderPriority from MeshVS,
27 PresentationManager3d from PrsMgr,
28 PackedMapOfInteger from TColStd
32 Initialize ( Parent : Mesh from MeshVS;
33 Flags : DisplayModeFlags from MeshVS;
34 DS : DataSource from MeshVS;
36 Priority : BuilderPriority from MeshVS = MeshVS_BP_Default );
37 ---Purpose: Constructor
38 -- Parent is pointer to MeshVS_Mesh object
39 -- Flags is set of display modes corresponding to this builder
40 -- DS is data source object, from which builder will pick geometry and topological information
41 -- Id is numeric identificator of builder. You must set it to positive integer, but if
42 -- you set it to -1, constructor will select the smallest integer, not occupied by other builders
43 -- Priority is numerical priority constant. As priority bigger, as sooner builder starts during
44 -- presentation construction
46 Build ( me; Prs : Presentation from Prs3d;
47 IDs : PackedMapOfInteger;
48 IDsToExclude: in out PackedMapOfInteger;
50 DisplayMode : Integer ) is deferred;
51 ---Purpose: Builds presentation of certain type of data.
52 -- Prs is presentation object which this method constructs.
53 -- IDs is set of numeric identificators forming object appearance.
54 -- IDsToExclude is set of IDs to exclude from processing. If some entity
55 -- has been excluded, it is not processed by other builders.
56 -- IsElement indicates, IDs is identificators of nodes or elements.
57 -- DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx)
59 CustomBuild ( me; Prs : Presentation from Prs3d;
60 IDs : PackedMapOfInteger;
61 IDsToExclude: in out PackedMapOfInteger;
62 DisplayMode : Integer ) is virtual;
63 ---Purpose: This method is called to build presentation of custom elements (they have MeshVS_ET_0D type).
64 -- IDs is set of numeric identificators of elements for custom building.
65 -- IDsToExclude is set of IDs to exclude from processing. If some entity
66 -- has been excluded, it is not processed by other builders.
67 -- DisplayMode is numeric constant describing display mode (see MeshVS_DisplayModeFlags.hxx)
69 CustomSensitiveEntity ( me; Owner : EntityOwner from SelectBasics;
70 SelectMode : Integer ) returns SensitiveEntity from SelectBasics is virtual;
71 ---Purpose: This method is called to build sensitive of custom elements ( they have MeshVS_ET_0D type )
73 GetFlags ( me ) returns Integer;
74 ---Purpose: Returns flags, assigned with builder during creation
76 TestFlags ( me; DisplayMode : Integer ) returns Boolean is virtual;
77 ---Purpose: Test whether display mode has flags assigned with this builder.
78 -- This method has default implementation and can be redefined for advance behavior
79 -- Returns Standard_True only if display mode is appropriate for this builder
81 GetId ( me ) returns Integer;
82 ---Purpose: Returns builder ID
84 GetPriority ( me ) returns Integer;
85 ---Purpose: Returns priority; as priority bigger, as soon builder will be called.
87 GetDataSource ( me ) returns DataSource from MeshVS;
88 ---Purpose: Returns custom data source or default ( from MeshVS_Mesh ) if custom is NULL
90 DataSource ( me ) returns DataSource from MeshVS is protected;
91 ---Purpose: Returns only custom data source
93 SetDataSource ( me : mutable; newDS : DataSource from MeshVS );
94 ---Purpose: Change custom data source
96 GetDrawer ( me ) returns Drawer from MeshVS;
97 ---Purpose: Returns custom drawer or default ( from MeshVS_Mesh ) if custom is NULL
99 Drawer ( me ) returns Drawer from MeshVS is protected;
100 ---Purpose: Returns only custom drawer
102 SetDrawer ( me : mutable; newDr : Drawer from MeshVS );
103 ---Purpose: Change custom drawer
105 SetExcluding ( me : mutable; state : Boolean );
106 ---Purpose: Set excluding state. If it is Standard_True, the nodes or elements, processed by current builder
107 -- will be noted and next builder won't process its.
109 IsExcludingOn ( me ) returns Boolean;
110 ---Purpose: Read excluding state
112 SetPresentationManager( me : mutable; thePrsMgr : PresentationManager3d from PrsMgr );
113 ---Purpose: Set presentation manager for builder
115 GetPresentationManager ( me ) returns PresentationManager3d from PrsMgr;
116 ---Purpose: Get presentation manager of builder
119 myIsExcluding : Boolean;
120 myParentMesh : MeshPtr from MeshVS is protected;
121 myDataSource : DataSource from MeshVS;
122 myDrawer : Drawer from MeshVS;
125 myPriority : Integer;
126 myPrsMgr : PresentationManager3d from PrsMgr;