diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index de1a28d6e..4e0e24e5f 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -197,4 +197,13 @@ jobs: with: files: | *.zip - + upload_url: '${{ steps.upload-url.outputs.url }}' + - name: Upload EXE files + if: contains(matrix.name, 'windows-msvc-hunter') + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' + with: + files: | + build/bin/assimp*.exe + upload_url: '${{ steps.upload-url.outputs.url }}' \ No newline at end of file diff --git a/code/AssetLib/JT/JTImporter.cpp b/code/AssetLib/JT/JTImporter.cpp index 8337712ea..db9c4f559 100644 --- a/code/AssetLib/JT/JTImporter.cpp +++ b/code/AssetLib/JT/JTImporter.cpp @@ -1 +1,83 @@ // + +#include "JT/JTImporter.h" +#include + +#include + +namespace Assimp::JT { + +enum class SegmentType { + Invalid = -1, //< Predefined class: Invalid + LOGICAL_SCENE_GRAPH,//< Predefined class: Logical_Scene_Graph + JT_BREP,//< Predefined class: JT_BRep + PMI_DATA, //(); + version.TOCOffset = reader.Read(); + } +} // Anonymous namespace + +JTImporter::JTImporter() : BaseImporter() { +} + +JTImporter::~JTImporter() { + +} + +bool JTImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const { + +} + +void JTImporter::setupProperties(const Importer* pImp) { + +} + +void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) { + auto stream = std::shared_ptr(pIOHandler->Open(pFile, "rb")); + if (!stream) { + throw DeadlyImportError("Failed to open JT file " + pFile + " for reading."); + } + StreamReaderLE reader(stream); + Version version; + readVersion(reader, version); +} + +} // Namespace Assimp diff --git a/code/AssetLib/JT/JTImporter.h b/code/AssetLib/JT/JTImporter.h index 834eb5da8..f8b37391d 100644 --- a/code/AssetLib/JT/JTImporter.h +++ b/code/AssetLib/JT/JTImporter.h @@ -1,4 +1,17 @@ #pragma once +#include + namespace Assimp::JT { + + +class JTImporter : public BaseImporter { +public: + JTImporter(); + ~JTImporter() override; + bool CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const override; + void setupProperties(const Importer* pImp) override; + +protected: + void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) override; } diff --git a/include/assimp/LineSplitter.h b/include/assimp/LineSplitter.h index a5dbbf27c..c9a755290 100644 --- a/include/assimp/LineSplitter.h +++ b/include/assimp/LineSplitter.h @@ -156,8 +156,8 @@ private: std::string mCur{}; const char *mEnd{nullptr}; StreamReaderLE &mStream; - bool mSwallow{false}; - bool mSkip_empty_lines{ false }; + bool mSwallow{ false }; + bool mSkip_empty_lines{ false };1 bool mTrim{ false }; }; diff --git a/include/assimp/StreamReader.h b/include/assimp/StreamReader.h index b3e87b222..5aaf37544 100644 --- a/include/assimp/StreamReader.h +++ b/include/assimp/StreamReader.h @@ -331,11 +331,11 @@ private: // -------------------------------------------------------------------------------------------- // `static` StreamReaders. Their byte order is fixed and they might be a little bit faster. #ifdef AI_BUILD_BIG_ENDIAN -typedef StreamReader StreamReaderLE; -typedef StreamReader StreamReaderBE; +using StreamReaderLE = StreamReader ; +using StreamReaderBE = StreamReader ; #else -typedef StreamReader StreamReaderBE; -typedef StreamReader StreamReaderLE; +using StreamReaderBE = StreamReader ; +using StreamReaderLE = StreamReader ; #endif // `dynamic` StreamReader. The byte order of the input data is specified in the