Introduce new helpers
This commit is contained in:
@@ -109,7 +109,7 @@ namespace OpenVulkano::AR
|
|||||||
|
|
||||||
[[nodiscard]] ArTrackingState GetTrackingState() const { return frameMetadata.trackingState; };
|
[[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; };
|
[[nodiscard]] Math::Timestamp GetTimestamp() const { return frameMetadata.timestamp; };
|
||||||
|
|
||||||
|
|||||||
13
openVulkanoCpp/Base/Defines.h
Normal file
13
openVulkanoCpp/Base/Defines.h
Normal file
@@ -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
|
||||||
@@ -127,6 +127,13 @@ namespace OpenVulkano
|
|||||||
return str.size() >= suffix.size() && 0 == str.compare(str.size()-suffix.size(), suffix.size(), suffix);
|
return str.size() >= suffix.size() && 0 == str.compare(str.size()-suffix.size(), suffix.size(), suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::pair<std::string, std::string> 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<char> ReadFile(const std::string& filePath);
|
static Array<char> ReadFile(const std::string& filePath);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user