Add XmpBuilder
This commit is contained in:
36
openVulkanoCpp/Image/XmpBuilder.hpp
Normal file
36
openVulkanoCpp/Image/XmpBuilder.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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>
|
||||
|
||||
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& SetCreateDate(const std::string& createDate);
|
||||
|
||||
[[maybe_unused]] std::string Close() { return Finalize(); }
|
||||
std::string Finalize();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user