Start design of AR abstraction layer
This commit is contained in:
52
openVulkanoCpp/AR/Provider/Playback/ArFramePlayback.hpp
Normal file
52
openVulkanoCpp/AR/Provider/Playback/ArFramePlayback.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user