/*
 * 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 "ArTrackingState.hpp"
#include "Math/CameraIntrinsic.hpp"
#include "Math/Timestamp.hpp"

namespace OpenVulkano::AR
{
	struct ArFrameMetadata
	{
		Math::CameraIntrinsicWithResolution intrinsic;
		Math::Matrix4f transformation, projection;
		float exposureTime, exposureOffset, lightIntensity, lightColorTemp;
		Math::Timestamp timestamp, timestampDepth;
		ArTrackingState trackingState;
		float physicalPixelSize = 0;

		[[nodiscard]] std::string ToYaml() const;

		[[nodiscard]] std::string ToXML() const;

		static ArFrameMetadata FromXML(const char* xml, size_t length);

		static ArFrameMetadata FromYaml(const char* yaml, size_t length);
	};
}