File indexing completed on 2025-01-18 10:04:41
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 <PrsMgr_ListOfPresentations.hxx>
0023
0024 class Graphic3d_Structure;
0025 typedef Graphic3d_Structure Prs3d_Presentation;
0026
0027 class TopLoc_Datum3D;
0028 class Prs3d_Drawer;
0029 class PrsMgr_Presentation;
0030 class PrsMgr_PresentableObject;
0031 class V3d_Viewer;
0032
0033 DEFINE_STANDARD_HANDLE(PrsMgr_PresentationManager, Standard_Transient)
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(const Handle(Graphic3d_StructureManager)& theStructureManager);
0046
0047
0048
0049 Standard_EXPORT void Display (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0);
0050
0051
0052
0053
0054 Standard_EXPORT void Erase (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0);
0055
0056
0057
0058 Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0);
0059
0060
0061 Standard_EXPORT void SetVisibility (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode, const Standard_Boolean theValue);
0062
0063
0064 Standard_EXPORT void Unhighlight (const Handle(PrsMgr_PresentableObject)& thePrsObject);
0065
0066
0067
0068 Standard_EXPORT void SetDisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject,
0069 const Standard_Integer theMode,
0070 const Graphic3d_DisplayPriority theNewPrior) const;
0071
0072
0073
0074 Standard_EXPORT Graphic3d_DisplayPriority DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode) const;
0075
0076
0077 Standard_EXPORT void SetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Graphic3d_ZLayerId theLayerId);
0078
0079
0080
0081
0082 Standard_EXPORT Graphic3d_ZLayerId GetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject) const;
0083
0084 Standard_EXPORT Standard_Boolean IsDisplayed (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;
0085
0086
0087
0088 Standard_EXPORT Standard_Boolean IsHighlighted (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;
0089
0090
0091
0092 Standard_EXPORT void Update (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;
0093
0094
0095
0096 Standard_EXPORT void BeginImmediateDraw();
0097
0098
0099 Standard_EXPORT void ClearImmediateDraw();
0100
0101
0102
0103 Standard_EXPORT void AddToImmediateList (const Handle(Prs3d_Presentation)& thePrs);
0104
0105
0106 Standard_EXPORT void EndImmediateDraw (const Handle(V3d_Viewer)& theViewer);
0107
0108
0109 Standard_EXPORT void RedrawImmediate (const Handle(V3d_Viewer)& theViewer);
0110
0111
0112 Standard_Boolean IsImmediateModeOn() const { return myImmediateModeOn > 0; }
0113
0114
0115
0116
0117 Standard_EXPORT void Color (const Handle(PrsMgr_PresentableObject)& thePrsObject,
0118 const Handle(Prs3d_Drawer)& theStyle,
0119 const Standard_Integer theMode = 0,
0120 const Handle(PrsMgr_PresentableObject)& theSelObj = NULL,
0121 const Graphic3d_ZLayerId theImmediateStructLayerId = Graphic3d_ZLayerId_Topmost);
0122
0123 Standard_EXPORT void Connect (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Handle(PrsMgr_PresentableObject)& theOtherObject, const Standard_Integer theMode = 0, const Standard_Integer theOtherMode = 0);
0124
0125
0126
0127
0128 Standard_EXPORT void Transform (const Handle(PrsMgr_PresentableObject)& thePrsObject,
0129 const Handle(TopLoc_Datum3D)& theTransformation,
0130 const Standard_Integer theMode = 0);
0131
0132
0133 const Handle(Graphic3d_StructureManager)& StructureManager() const { return myStructureManager; }
0134
0135
0136
0137 Standard_EXPORT Standard_Boolean HasPresentation (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;
0138
0139
0140
0141
0142 Standard_EXPORT Handle(PrsMgr_Presentation) Presentation (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0, const Standard_Boolean theToCreate = Standard_False, const Handle(PrsMgr_PresentableObject)& theSelObj = NULL) const;
0143
0144
0145
0146
0147
0148 Standard_EXPORT void UpdateHighlightTrsf (const Handle(V3d_Viewer)& theViewer,
0149 const Handle(PrsMgr_PresentableObject)& theObj,
0150 const Standard_Integer theMode = 0,
0151 const Handle(PrsMgr_PresentableObject)& theSelObj = NULL);
0152
0153 protected:
0154
0155
0156 Standard_EXPORT Standard_Boolean RemovePresentation (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0);
0157
0158 private:
0159
0160
0161
0162 void displayImmediate (const Handle(V3d_Viewer)& theViewer);
0163
0164 protected:
0165
0166 Handle(Graphic3d_StructureManager) myStructureManager;
0167 Standard_Integer myImmediateModeOn;
0168 PrsMgr_ListOfPresentations myImmediateList;
0169 PrsMgr_ListOfPresentations myViewDependentImmediateList;
0170
0171 };
0172
0173 #endif