Files
OpenVulkano/openVulkanoCpp/Image/XmpBuilder.hpp
2025-08-12 14:55:55 +02:00

39 lines
1.3 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 "Math/CameraIntrinsic.hpp"
#include "Math/Pose.hpp"
#include <sstream>
#include <ctime>
namespace OpenVulkano::Image
{
class XmpBuilder final
{
std::stringstream xmpData;
bool complete = false;
public:
XmpBuilder();
[[maybe_unused]] XmpBuilder& SetCameraIntrinsic(const Math::CameraIntrinsicWithResolution& intrinsic);
[[maybe_unused]] XmpBuilder& SetPose(const Math::PoseF& pose) { SetPosition(pose.GetPosition()); SetOrientation(pose.GetOrientationAsEuler()); return *this; }
[[maybe_unused]] XmpBuilder& SetPosition(const Math::Vector3f& position);
[[maybe_unused]] XmpBuilder& SetOrientation(const Math::Vector3f& orientation); // in rad
[[maybe_unused]] XmpBuilder& SetSensorSize(const Math::Vector2f& sensorSize);
[[maybe_unused]] XmpBuilder& SetFocalLength(float focalLengthMM);
[[maybe_unused]] XmpBuilder& SetExposureTime(double exposureTime);
[[maybe_unused]] XmpBuilder& SetCreateDateNow();
[[maybe_unused]] XmpBuilder& SetCreateDate(const std::string& createDate);
[[maybe_unused]] std::string Close() { return Finalize(); }
std::string Finalize();
};
}