diff --git a/openVulkanoCpp/AR/ArFrame.hpp b/openVulkanoCpp/AR/ArFrame.hpp index 0712fbe..2384b2a 100644 --- a/openVulkanoCpp/AR/ArFrame.hpp +++ b/openVulkanoCpp/AR/ArFrame.hpp @@ -109,7 +109,7 @@ namespace OpenVulkano::AR [[nodiscard]] ArTrackingState GetTrackingState() const { return frameMetadata.trackingState; }; - [[nodiscard]] virtual Math::PoseF GetPose() const {}; //TODO + [[nodiscard]] virtual Math::PoseF GetPose() const { return Math::PoseF({}); }; //TODO [[nodiscard]] Math::Timestamp GetTimestamp() const { return frameMetadata.timestamp; }; diff --git a/openVulkanoCpp/Base/Defines.h b/openVulkanoCpp/Base/Defines.h new file mode 100644 index 0000000..da8facd --- /dev/null +++ b/openVulkanoCpp/Base/Defines.h @@ -0,0 +1,13 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +#ifdef __cplusplus +#define EXTERN_C extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C +#define EXTERN_C_END +#endif \ No newline at end of file diff --git a/openVulkanoCpp/Base/Utils.hpp b/openVulkanoCpp/Base/Utils.hpp index 316ce9b..c6e45ea 100644 --- a/openVulkanoCpp/Base/Utils.hpp +++ b/openVulkanoCpp/Base/Utils.hpp @@ -127,6 +127,13 @@ namespace OpenVulkano return str.size() >= suffix.size() && 0 == str.compare(str.size()-suffix.size(), suffix.size(), suffix); } + static std::pair SplitAtLastOccurrence(const std::string& str, char splitAt) + { + size_t pos = str.rfind(splitAt); + if (pos == std::string::npos) return {str, ""}; + else return {str.substr(0, pos), str.substr(pos + 1)}; + } + static Array ReadFile(const std::string& filePath); }; }