Start design of AR abstraction layer

This commit is contained in:
2021-05-28 22:22:22 +02:00
parent cb9f33b6f0
commit d80249cd1c
14 changed files with 1013 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
/*
* 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/.
*/
#pragma once
#include "AR/ArFrame.h"
#include "ArPlaybackReader.hpp"
#include "ArPlaybackData.hpp"
namespace openVulkanoCpp::AR::Playback
{
class ArSessionPlayback;
class ArFramePlayback final : public ArFrame
{
public:
ArFramePlayback(const std::shared_ptr<ArSessionPlayback>& session, ArPlaybackReader& frameReader);
ArTrackingState GetTrackingState() override;
Math::PoseF GetPose() override;
Math::Timestamp GetTimestamp() override;
ArImagePlanar GetCameraImage() override;
ArDepthImage GetDepthImage() override;
const Math::Matrix4f& GetCameraTransformation() override;
Math::Matrix4f GetCameraViewForCurrentDeviceOrientation() override;
Math::Matrix4f GetCameraProjection(Math::Vector2f viewportSize, float near, float far) override;
float GetConfidenceNormalisationFactor() override;
[[nodiscard]] float GetColorTemperature() const override;
private:
ArPlaybackFrameData frameData;
ArImagePlanar colorImage;
ArDepthImage depthImage;
std::unique_ptr<char[]> confImgData;
std::unique_ptr<float[]> depthImgData;
ColorImg colorImgData;
//cv::Mat colorImgData;
};
}