|
||||
File indexing completed on 2025-01-18 10:04:42
0001 // Copyright (c) 2022 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _RWGltf_Provider_HeaderFile 0015 #define _RWGltf_Provider_HeaderFile 0016 0017 #include <DE_Provider.hxx> 0018 #include <RWGltf_CafReader.hxx> 0019 #include <RWGltf_ConfigurationNode.hxx> 0020 0021 //! The class to transfer glTF files. 0022 //! Reads and Writes any glTF files into/from OCCT. 0023 //! Each operation needs configuration node. 0024 //! 0025 //! Providers grouped by Vendor name and Format type. 0026 //! The Vendor name is "OCC" 0027 //! The Format type is "GLTF" 0028 //! The import process is supported. 0029 //! The export process is supported. 0030 class RWGltf_Provider : public DE_Provider 0031 { 0032 public: 0033 DEFINE_STANDARD_RTTIEXT(RWGltf_Provider, DE_Provider) 0034 0035 public: 0036 0037 //! Default constructor 0038 //! Configure translation process with global configuration 0039 Standard_EXPORT RWGltf_Provider(); 0040 0041 //! Configure translation process 0042 //! @param[in] theNode object to copy 0043 Standard_EXPORT RWGltf_Provider(const Handle(DE_ConfigurationNode)& theNode); 0044 0045 public: 0046 0047 //! Reads a CAD file, according internal configuration 0048 //! @param[in] thePath path to the import CAD file 0049 //! @param[out] theDocument document to save result 0050 //! @param[in] theWS current work session 0051 //! @param theProgress[in] progress indicator 0052 //! @return true if Read operation has ended correctly 0053 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0054 const Handle(TDocStd_Document)& theDocument, 0055 Handle(XSControl_WorkSession)& theWS, 0056 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0057 0058 //! Writes a CAD file, according internal configuration 0059 //! @param[in] thePath path to the export CAD file 0060 //! @param[out] theDocument document to export 0061 //! @param[in] theWS current work session 0062 //! @param theProgress[in] progress indicator 0063 //! @return true if Write operation has ended correctly 0064 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0065 const Handle(TDocStd_Document)& theDocument, 0066 Handle(XSControl_WorkSession)& theWS, 0067 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0068 0069 //! Reads a CAD file, according internal configuration 0070 //! @param[in] thePath path to the import CAD file 0071 //! @param[out] theDocument document to save result 0072 //! @param theProgress[in] progress indicator 0073 //! @return true if Read operation has ended correctly 0074 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0075 const Handle(TDocStd_Document)& theDocument, 0076 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0077 0078 //! Writes a CAD file, according internal configuration 0079 //! @param[in] thePath path to the export CAD file 0080 //! @param[out] theDocument document to export 0081 //! @param theProgress[in] progress indicator 0082 //! @return true if Write operation has ended correctly 0083 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0084 const Handle(TDocStd_Document)& theDocument, 0085 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0086 0087 //! Reads a CAD file, according internal configuration 0088 //! @param[in] thePath path to the import CAD file 0089 //! @param[out] theShape shape to save result 0090 //! @param[in] theWS current work session 0091 //! @param theProgress[in] progress indicator 0092 //! @return true if Read operation has ended correctly 0093 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0094 TopoDS_Shape& theShape, 0095 Handle(XSControl_WorkSession)& theWS, 0096 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0097 0098 //! Writes a CAD file, according internal configuration 0099 //! @param[in] thePath path to the export CAD file 0100 //! @param[out] theShape shape to export 0101 //! @param[in] theWS current work session 0102 //! @param theProgress[in] progress indicator 0103 //! @return true if Write operation has ended correctly 0104 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0105 const TopoDS_Shape& theShape, 0106 Handle(XSControl_WorkSession)& theWS, 0107 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0108 0109 //! Reads a CAD file, according internal configuration 0110 //! @param[in] thePath path to the import CAD file 0111 //! @param[out] theShape shape to save result 0112 //! @param theProgress[in] progress indicator 0113 //! @return true if Read operation has ended correctly 0114 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0115 TopoDS_Shape& theShape, 0116 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0117 0118 //! Writes a CAD file, according internal configuration 0119 //! @param[in] thePath path to the export CAD file 0120 //! @param[out] theShape shape to export 0121 //! @param theProgress[in] progress indicator 0122 //! @return true if Write operation has ended correctly 0123 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0124 const TopoDS_Shape& theShape, 0125 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0126 0127 public: 0128 0129 //! Gets CAD format name of associated provider 0130 //! @return provider CAD format 0131 Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; 0132 0133 //! Gets provider's vendor name of associated provider 0134 //! @return provider's vendor name 0135 Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; 0136 0137 }; 0138 0139 #endif // _RWGltf_Provider_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |