Expand ArFrame API with additional getters
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "ArFrame.hpp"
|
||||
#include "ArSession.hpp"
|
||||
#include "ArRecorder.hpp"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
namespace OpenVulkano::AR
|
||||
{
|
||||
@@ -26,6 +28,11 @@ namespace OpenVulkano::AR
|
||||
void ArFrame::SaveToFile(const std::filesystem::path& path, bool downsample)
|
||||
{
|
||||
m_session->GetRecorder().SaveToFile(shared_from_this(), path, downsample);
|
||||
std::string metaContent = GetFrameMetadata().ToXML();
|
||||
std::string metaPath = path.string() + std::string(".meta");
|
||||
std::ofstream file (metaPath, std::ios::out);
|
||||
file << metaContent;
|
||||
file.close();
|
||||
}
|
||||
|
||||
const Scene::Texture* ArFrame::GetImageTexture()
|
||||
@@ -38,4 +45,4 @@ namespace OpenVulkano::AR
|
||||
{
|
||||
if (m_texture) m_session->ReturnTexture(m_texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user