File indexing completed on 2025-01-18 10:05:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _XCAFDoc_MaterialTool_HeaderFile
0017 #define _XCAFDoc_MaterialTool_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021
0022 #include <TDataStd_GenericEmpty.hxx>
0023 #include <Standard_Boolean.hxx>
0024 #include <TDF_LabelSequence.hxx>
0025 #include <Standard_Real.hxx>
0026 class XCAFDoc_ShapeTool;
0027 class TDF_Label;
0028 class Standard_GUID;
0029 class TCollection_HAsciiString;
0030
0031
0032 class XCAFDoc_MaterialTool;
0033 DEFINE_STANDARD_HANDLE(XCAFDoc_MaterialTool, TDataStd_GenericEmpty)
0034
0035
0036
0037
0038
0039
0040 class XCAFDoc_MaterialTool : public TDataStd_GenericEmpty
0041 {
0042
0043 public:
0044
0045
0046 Standard_EXPORT XCAFDoc_MaterialTool();
0047
0048
0049 Standard_EXPORT static Handle(XCAFDoc_MaterialTool) Set (const TDF_Label& L);
0050
0051 Standard_EXPORT static const Standard_GUID& GetID();
0052
0053
0054 Standard_EXPORT TDF_Label BaseLabel() const;
0055
0056
0057 Standard_EXPORT const Handle(XCAFDoc_ShapeTool)& ShapeTool();
0058
0059
0060
0061 Standard_EXPORT Standard_Boolean IsMaterial (const TDF_Label& lab) const;
0062
0063
0064
0065 Standard_EXPORT void GetMaterialLabels (TDF_LabelSequence& Labels) const;
0066
0067
0068 Standard_EXPORT TDF_Label AddMaterial (const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, const Standard_Real aDensity, const Handle(TCollection_HAsciiString)& aDensName, const Handle(TCollection_HAsciiString)& aDensValType) const;
0069
0070
0071 Standard_EXPORT void SetMaterial (const TDF_Label& L, const TDF_Label& MatL) const;
0072
0073
0074
0075 Standard_EXPORT void SetMaterial (const TDF_Label& L, const Handle(TCollection_HAsciiString)& aName, const Handle(TCollection_HAsciiString)& aDescription, const Standard_Real aDensity, const Handle(TCollection_HAsciiString)& aDensName, const Handle(TCollection_HAsciiString)& aDensValType) const;
0076
0077
0078
0079 Standard_EXPORT static Standard_Boolean GetMaterial (const TDF_Label& MatL, Handle(TCollection_HAsciiString)& aName, Handle(TCollection_HAsciiString)& aDescription, Standard_Real& aDensity, Handle(TCollection_HAsciiString)& aDensName, Handle(TCollection_HAsciiString)& aDensValType);
0080
0081
0082
0083 Standard_EXPORT static Standard_Real GetDensityForShape (const TDF_Label& ShapeL);
0084
0085 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0086
0087
0088 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0089
0090
0091 DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_MaterialTool,TDataStd_GenericEmpty)
0092
0093
0094 private:
0095
0096
0097 Handle(XCAFDoc_ShapeTool) myShapeTool;
0098
0099
0100 };
0101
0102
0103
0104
0105
0106
0107
0108 #endif