File indexing completed on 2026-06-05 08:34:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _RWGltf_CafReader_HeaderFile
0016 #define _RWGltf_CafReader_HeaderFile
0017
0018 #include <NCollection_Vector.hxx>
0019 #include <RWMesh_CafReader.hxx>
0020 #include <TopoDS_Face.hxx>
0021
0022 class RWMesh_TriangulationReader;
0023
0024
0025 class RWGltf_CafReader : public RWMesh_CafReader
0026 {
0027 DEFINE_STANDARD_RTTIEXT(RWGltf_CafReader, RWMesh_CafReader)
0028 public:
0029
0030 Standard_EXPORT RWGltf_CafReader();
0031
0032
0033 bool ToParallel() const { return myToParallel; }
0034
0035
0036 void SetParallel(bool theToParallel) { myToParallel = theToParallel; }
0037
0038
0039 bool ToSkipEmptyNodes() { return myToSkipEmptyNodes; }
0040
0041
0042 void SetSkipEmptyNodes(bool theToSkip) { myToSkipEmptyNodes = theToSkip; }
0043
0044
0045
0046 bool ToLoadAllScenes() const { return myToLoadAllScenes; }
0047
0048
0049
0050 void SetLoadAllScenes(bool theToLoadAll) { myToLoadAllScenes = theToLoadAll; }
0051
0052
0053 bool ToUseMeshNameAsFallback() { return myUseMeshNameAsFallback; }
0054
0055
0056 void SetMeshNameAsFallback(bool theToFallback) { myUseMeshNameAsFallback = theToFallback; }
0057
0058
0059 bool IsDoublePrecision() const { return myIsDoublePrecision; }
0060
0061
0062 void SetDoublePrecision(bool theIsDouble) { myIsDoublePrecision = theIsDouble; }
0063
0064
0065 bool ToSkipLateDataLoading() { return myToSkipLateDataLoading; }
0066
0067
0068 void SetToSkipLateDataLoading(bool theToSkip) { myToSkipLateDataLoading = theToSkip; }
0069
0070
0071
0072
0073 bool ToKeepLateData() { return myToKeepLateData; }
0074
0075
0076 void SetToKeepLateData(bool theToKeep) { myToKeepLateData = theToKeep; }
0077
0078
0079 bool ToPrintDebugMessages() const { return myToPrintDebugMessages; }
0080
0081
0082 void SetToPrintDebugMessages(const Standard_Boolean theToPrint)
0083 {
0084 myToPrintDebugMessages = theToPrint;
0085 }
0086
0087 protected:
0088
0089 Standard_EXPORT virtual Standard_Boolean performMesh(std::istream& theStream,
0090 const TCollection_AsciiString& theFile,
0091 const Message_ProgressRange& theProgress,
0092 const Standard_Boolean theToProbe)
0093 Standard_OVERRIDE;
0094
0095
0096
0097
0098 Standard_EXPORT virtual Handle(RWMesh_TriangulationReader) createMeshReaderContext() const;
0099
0100
0101 Standard_EXPORT virtual Standard_Boolean readLateData(NCollection_Vector<TopoDS_Face>& theFaces,
0102 const TCollection_AsciiString& theFile,
0103 const Message_ProgressRange& theProgress);
0104
0105
0106 Standard_EXPORT void updateLateDataReader(
0107 NCollection_Vector<TopoDS_Face>& theFaces,
0108 const Handle(RWMesh_TriangulationReader)& theReader) const;
0109
0110 protected:
0111 class CafReader_GltfBaseLoadingFunctor;
0112 class CafReader_GltfFullDataLoadingFunctor;
0113 class CafReader_GltfStreamDataLoadingFunctor;
0114
0115 protected:
0116 Standard_Boolean myToParallel;
0117 Standard_Boolean myToSkipEmptyNodes;
0118
0119 Standard_Boolean myToLoadAllScenes;
0120 Standard_Boolean myUseMeshNameAsFallback;
0121 Standard_Boolean myIsDoublePrecision;
0122 Standard_Boolean myToSkipLateDataLoading;
0123 Standard_Boolean myToKeepLateData;
0124
0125 Standard_Boolean myToPrintDebugMessages;
0126 };
0127
0128 #endif