43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
/*
|
|
* 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.hpp"
|
|
#include "ArPlaybackReader.hpp"
|
|
|
|
namespace OpenVulkano::AR::Playback
|
|
{
|
|
class ArSessionPlayback;
|
|
|
|
class ArFramePlayback final : public ArFrame
|
|
{
|
|
ArImagePlanar colorImage;
|
|
ArDepthImage depthImage;
|
|
|
|
std::unique_ptr<char[]> confImgData;
|
|
std::unique_ptr<float[]> depthImgData;
|
|
ColorImg colorImgData;
|
|
|
|
public:
|
|
ArFramePlayback(const std::shared_ptr<ArSessionPlayback>& session, ArPlaybackReader& frameReader);
|
|
|
|
ArFramePlayback(const std::shared_ptr<ArSessionPlayback>& session, const std::filesystem::path& imagePath);
|
|
|
|
ArImagePlanar GetCameraImage() override;
|
|
|
|
ArDepthImage GetDepthImage() override;
|
|
|
|
Math::Matrix4f GetCameraViewForCurrentDeviceOrientation() override;
|
|
|
|
Math::Matrix4f GetCameraProjection(Math::Vector2f viewportSize, float near, float far) override;
|
|
|
|
private:
|
|
void SetDepthImgInfo(DepthImage& depth);
|
|
void SetColorImgInfo();
|
|
};
|
|
}
|