/* * 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" #import namespace OpenVulkano::AR::ArKit { class ArSessionArKitInternal; class ArFrameArKit final : public ArFrame { public: ArFrameArKit(ARFrame* arKitFrame, std::shared_ptr arSession); ~ArFrameArKit() override; ArImagePlanar GetCameraImage() override; ArDepthImage GetDepthImage() override; Math::Matrix4f GetCameraViewForCurrentDeviceOrientation() override; Math::Matrix4f GetCameraProjection(Math::Vector2f viewportSize, float near, float far) override; ARFrame* GetArKitFrame() const { return m_arKitFrame; } bool GetCameraImageAsJpeg(const std::function& handler) override; private: ARFrame* m_arKitFrame; bool m_lockedColor, m_lockedDepth; uint8_t m_frameDepthQuality = 0; ArImagePlanar m_colorImage; ArDepthImage m_depthImage; }; }