File indexing completed on 2026-09-19 09:29:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _PrsMgr_PresentationManager_HeaderFile
0018 #define _PrsMgr_PresentationManager_HeaderFile
0019
0020 #include <Graphic3d_StructureManager.hxx>
0021 #include <Graphic3d_ZLayerId.hxx>
0022 #include <NCollection_List.hxx>
0023 #include <Prs3d_Presentation.hxx>
0024
0025 class Graphic3d_Structure;
0026 typedef Graphic3d_Structure Prs3d_Presentation;
0027
0028 class TopLoc_Datum3D;
0029 class Prs3d_Drawer;
0030 class PrsMgr_Presentation;
0031 class PrsMgr_PresentableObject;
0032 class V3d_Viewer;
0033
0034
0035
0036
0037
0038
0039 class PrsMgr_PresentationManager : public Standard_Transient
0040 {
0041 DEFINE_STANDARD_RTTIEXT(PrsMgr_PresentationManager, Standard_Transient)
0042 public:
0043
0044
0045 Standard_EXPORT PrsMgr_PresentationManager(
0046 const occ::handle<Graphic3d_StructureManager>& theStructureManager);
0047
0048
0049
0050 Standard_EXPORT void Display(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0051 const int theMode = 0);
0052
0053
0054
0055
0056 Standard_EXPORT void Erase(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0057 const int theMode = 0);
0058
0059
0060
0061 Standard_EXPORT virtual void Clear(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0062 const int theMode = 0);
0063
0064
0065 Standard_EXPORT void SetVisibility(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0066 const int theMode,
0067 const bool theValue);
0068
0069
0070 Standard_EXPORT void Unhighlight(const occ::handle<PrsMgr_PresentableObject>& thePrsObject);
0071
0072
0073
0074 Standard_EXPORT void SetDisplayPriority(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0075 const int theMode,
0076 const Graphic3d_DisplayPriority theNewPrior) const;
0077
0078
0079
0080 Standard_EXPORT Graphic3d_DisplayPriority
0081 DisplayPriority(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0082 const int theMode) const;
0083
0084
0085 Standard_EXPORT void SetZLayer(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0086 const Graphic3d_ZLayerId theLayerId);
0087
0088
0089
0090
0091 Standard_EXPORT Graphic3d_ZLayerId
0092 GetZLayer(const occ::handle<PrsMgr_PresentableObject>& thePrsObject) const;
0093
0094 Standard_EXPORT bool IsDisplayed(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0095 const int theMode = 0) const;
0096
0097
0098
0099 Standard_EXPORT bool IsHighlighted(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0100 const int theMode = 0) const;
0101
0102
0103
0104 Standard_EXPORT void Update(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0105 const int theMode = 0) const;
0106
0107
0108
0109
0110 Standard_EXPORT void BeginImmediateDraw();
0111
0112
0113 Standard_EXPORT void ClearImmediateDraw();
0114
0115
0116
0117 Standard_EXPORT void AddToImmediateList(const occ::handle<Prs3d_Presentation>& thePrs);
0118
0119
0120
0121 Standard_EXPORT void EndImmediateDraw(const occ::handle<V3d_Viewer>& theViewer);
0122
0123
0124 Standard_EXPORT void RedrawImmediate(const occ::handle<V3d_Viewer>& theViewer);
0125
0126
0127
0128 bool IsImmediateModeOn() const { return myImmediateModeOn > 0; }
0129
0130
0131
0132
0133 Standard_EXPORT void Color(
0134 const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0135 const occ::handle<Prs3d_Drawer>& theStyle,
0136 const int theMode = 0,
0137 const occ::handle<PrsMgr_PresentableObject>& theSelObj = nullptr,
0138 const Graphic3d_ZLayerId theImmediateStructLayerId = Graphic3d_ZLayerId_Topmost);
0139
0140 Standard_EXPORT void Connect(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0141 const occ::handle<PrsMgr_PresentableObject>& theOtherObject,
0142 const int theMode = 0,
0143 const int theOtherMode = 0);
0144
0145
0146
0147
0148 Standard_EXPORT void Transform(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0149 const occ::handle<TopLoc_Datum3D>& theTransformation,
0150 const int theMode = 0);
0151
0152
0153 const occ::handle<Graphic3d_StructureManager>& StructureManager() const
0154 {
0155 return myStructureManager;
0156 }
0157
0158
0159
0160
0161 Standard_EXPORT bool HasPresentation(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0162 const int theMode = 0) const;
0163
0164
0165
0166
0167
0168 Standard_EXPORT occ::handle<PrsMgr_Presentation> Presentation(
0169 const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0170 const int theMode = 0,
0171 const bool theToCreate = false,
0172 const occ::handle<PrsMgr_PresentableObject>& theSelObj = nullptr) const;
0173
0174
0175
0176
0177
0178
0179
0180 Standard_EXPORT void UpdateHighlightTrsf(
0181 const occ::handle<V3d_Viewer>& theViewer,
0182 const occ::handle<PrsMgr_PresentableObject>& theObj,
0183 const int theMode = 0,
0184 const occ::handle<PrsMgr_PresentableObject>& theSelObj = nullptr);
0185
0186 protected:
0187
0188
0189 Standard_EXPORT bool RemovePresentation(const occ::handle<PrsMgr_PresentableObject>& thePrsObject,
0190 const int theMode = 0);
0191
0192 private:
0193
0194
0195 void displayImmediate(const occ::handle<V3d_Viewer>& theViewer);
0196
0197 protected:
0198 occ::handle<Graphic3d_StructureManager> myStructureManager;
0199 int myImmediateModeOn;
0200 NCollection_List<occ::handle<Prs3d_Presentation>> myImmediateList;
0201 NCollection_List<occ::handle<Prs3d_Presentation>> myViewDependentImmediateList;
0202 };
0203
0204 #endif