File indexing completed on 2025-01-18 10:05:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TPrsStd_AISPresentation_HeaderFile
0018 #define _TPrsStd_AISPresentation_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <Quantity_NameOfColor.hxx>
0024 #include <Graphic3d_NameOfMaterial.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TDF_Attribute.hxx>
0027 #include <TDataXtd_Presentation.hxx>
0028 #include <AIS_InteractiveContext.hxx>
0029
0030 class AIS_InteractiveObject;
0031 class Standard_GUID;
0032 class TDF_Label;
0033 class TDF_RelocationTable;
0034 class TDF_AttributeDelta;
0035
0036 class TPrsStd_AISPresentation;
0037 DEFINE_STANDARD_HANDLE(TPrsStd_AISPresentation, TDF_Attribute)
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 class TPrsStd_AISPresentation : public TDF_Attribute
0048 {
0049
0050 public:
0051
0052
0053
0054 Standard_EXPORT static const Standard_GUID& GetID();
0055
0056
0057
0058 Standard_EXPORT static Handle(TPrsStd_AISPresentation) Set (const TDF_Label& L, const Standard_GUID& driver);
0059
0060
0061 Standard_EXPORT static void Unset (const TDF_Label& L);
0062
0063
0064
0065
0066
0067 Standard_EXPORT static Handle(TPrsStd_AISPresentation) Set (const Handle(TDF_Attribute)& master);
0068
0069 Standard_EXPORT TPrsStd_AISPresentation();
0070
0071 Standard_EXPORT void SetDisplayed (const Standard_Boolean B);
0072
0073
0074
0075
0076 Standard_EXPORT void Display (const Standard_Boolean update = Standard_False);
0077
0078
0079
0080
0081
0082 Standard_EXPORT void Erase (const Standard_Boolean remove = Standard_False);
0083
0084
0085 Standard_EXPORT void Update();
0086
0087 Standard_EXPORT Standard_GUID GetDriverGUID() const;
0088
0089 Standard_EXPORT void SetDriverGUID (const Standard_GUID& guid);
0090
0091
0092
0093 Standard_EXPORT Standard_Boolean IsDisplayed() const;
0094
0095
0096 Standard_EXPORT Handle(AIS_InteractiveObject) GetAIS() const;
0097
0098
0099
0100 Standard_EXPORT Graphic3d_NameOfMaterial Material() const;
0101
0102
0103 Standard_EXPORT void SetMaterial (const Graphic3d_NameOfMaterial aName);
0104
0105
0106 Standard_EXPORT Standard_Boolean HasOwnMaterial() const;
0107
0108
0109 Standard_EXPORT void UnsetMaterial();
0110
0111
0112
0113
0114
0115 Standard_EXPORT void SetTransparency (const Standard_Real aValue = 0.6);
0116
0117 Standard_EXPORT Standard_Real Transparency() const;
0118
0119
0120 Standard_EXPORT Standard_Boolean HasOwnTransparency() const;
0121
0122
0123 Standard_EXPORT void UnsetTransparency();
0124
0125 Standard_EXPORT Quantity_NameOfColor Color() const;
0126
0127
0128 Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor);
0129
0130
0131 Standard_EXPORT Standard_Boolean HasOwnColor() const;
0132
0133
0134 Standard_EXPORT void UnsetColor();
0135
0136 Standard_EXPORT Standard_Real Width() const;
0137
0138
0139 Standard_EXPORT void SetWidth (const Standard_Real aWidth);
0140
0141
0142 Standard_EXPORT Standard_Boolean HasOwnWidth() const;
0143
0144
0145 Standard_EXPORT void UnsetWidth();
0146
0147 Standard_EXPORT Standard_Integer Mode() const;
0148
0149 Standard_EXPORT void SetMode (const Standard_Integer theMode);
0150
0151 Standard_EXPORT Standard_Boolean HasOwnMode() const;
0152
0153 Standard_EXPORT void UnsetMode();
0154
0155
0156
0157 Standard_EXPORT Standard_Integer GetNbSelectionModes() const;
0158 Standard_EXPORT Standard_Integer SelectionMode(const int index = 1) const;
0159
0160
0161
0162
0163
0164
0165 Standard_EXPORT void SetSelectionMode(const Standard_Integer theSelectionMode, const Standard_Boolean theTransaction = Standard_True);
0166 Standard_EXPORT void AddSelectionMode(const Standard_Integer theSelectionMode, const Standard_Boolean theTransaction = Standard_True);
0167
0168 Standard_EXPORT Standard_Boolean HasOwnSelectionMode() const;
0169
0170
0171 Standard_EXPORT void UnsetSelectionMode();
0172
0173 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0174
0175 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0176
0177 Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
0178
0179 Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
0180
0181 Standard_EXPORT virtual Handle(TDF_Attribute) BackupCopy() const Standard_OVERRIDE;
0182
0183 Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
0184
0185 Standard_EXPORT virtual void BeforeRemoval() Standard_OVERRIDE;
0186
0187 Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
0188
0189 Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
0190
0191 Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0192
0193
0194 Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
0195
0196
0197 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0198
0199 DEFINE_STANDARD_RTTIEXT(TPrsStd_AISPresentation,TDF_Attribute)
0200
0201 protected:
0202
0203
0204 Standard_EXPORT virtual Handle(TDataXtd_Presentation) getData () const;
0205
0206 private:
0207
0208 Handle(AIS_InteractiveContext) getAISContext() const;
0209
0210
0211
0212 void ActivateSelectionMode();
0213
0214
0215
0216 Standard_EXPORT void AISUpdate();
0217
0218
0219 Standard_EXPORT void AISDisplay();
0220
0221
0222
0223
0224 Standard_EXPORT void AISErase (const Standard_Boolean remove = Standard_False);
0225
0226 private:
0227 Handle(AIS_InteractiveObject) myAIS;
0228 };
0229
0230 #endif