File indexing completed on 2025-01-18 10:04:42
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
0031 Standard_EXPORT RWGltf_CafReader();
0032
0033
0034 bool ToParallel() const { return myToParallel; }
0035
0036
0037 void SetParallel (bool theToParallel) { myToParallel = theToParallel; }
0038
0039
0040 bool ToSkipEmptyNodes() { return myToSkipEmptyNodes; }
0041
0042
0043 void SetSkipEmptyNodes (bool theToSkip) { myToSkipEmptyNodes = theToSkip; }
0044
0045
0046 bool ToLoadAllScenes() const { return myToLoadAllScenes; }
0047
0048
0049 void SetLoadAllScenes (bool theToLoadAll) { myToLoadAllScenes = theToLoadAll; }
0050
0051
0052 bool ToUseMeshNameAsFallback() { return myUseMeshNameAsFallback; }
0053
0054
0055 void SetMeshNameAsFallback (bool theToFallback) { myUseMeshNameAsFallback = theToFallback; }
0056
0057
0058 bool IsDoublePrecision() const { return myIsDoublePrecision; }
0059
0060
0061 void SetDoublePrecision (bool theIsDouble) { myIsDoublePrecision = theIsDouble; }
0062
0063
0064 bool ToSkipLateDataLoading() { return myToSkipLateDataLoading; }
0065
0066
0067 void SetToSkipLateDataLoading (bool theToSkip) { myToSkipLateDataLoading = theToSkip; }
0068
0069
0070
0071
0072 bool ToKeepLateData() { return myToKeepLateData; }
0073
0074
0075 void SetToKeepLateData (bool theToKeep) { myToKeepLateData = theToKeep; }
0076
0077
0078 bool ToPrintDebugMessages() const { return myToPrintDebugMessages; }
0079
0080
0081 void SetToPrintDebugMessages (const Standard_Boolean theToPrint) { myToPrintDebugMessages = theToPrint; }
0082
0083 protected:
0084
0085
0086 Standard_EXPORT virtual Standard_Boolean performMesh (std::istream& theStream,
0087 const TCollection_AsciiString& theFile,
0088 const Message_ProgressRange& theProgress,
0089 const Standard_Boolean theToProbe) Standard_OVERRIDE;
0090
0091
0092
0093
0094 Standard_EXPORT virtual Handle(RWMesh_TriangulationReader) createMeshReaderContext() const;
0095
0096
0097 Standard_EXPORT virtual Standard_Boolean readLateData (NCollection_Vector<TopoDS_Face>& theFaces,
0098 const TCollection_AsciiString& theFile,
0099 const Message_ProgressRange& theProgress);
0100
0101
0102 Standard_EXPORT void updateLateDataReader (NCollection_Vector<TopoDS_Face>& theFaces,
0103 const Handle(RWMesh_TriangulationReader)& theReader) const;
0104
0105 protected:
0106
0107 class CafReader_GltfBaseLoadingFunctor;
0108 class CafReader_GltfFullDataLoadingFunctor;
0109 class CafReader_GltfStreamDataLoadingFunctor;
0110
0111 protected:
0112
0113 Standard_Boolean myToParallel;
0114 Standard_Boolean myToSkipEmptyNodes;
0115 Standard_Boolean myToLoadAllScenes;
0116 Standard_Boolean myUseMeshNameAsFallback;
0117 Standard_Boolean myIsDoublePrecision;
0118 Standard_Boolean myToSkipLateDataLoading;
0119 Standard_Boolean myToKeepLateData;
0120 Standard_Boolean myToPrintDebugMessages;
0121
0122 };
0123
0124 #endif