#include "device/vr/android/arcore/arcore.h"
#include "device/vr/android/arcore/arcore_math_utils.h"
namespace device {
gfx::Transform ArCore::GetCameraUvFromScreenUvTransform() const {
gfx::Transform transform = GetDepthUvFromScreenUvTransform();
transform.Translate(0, 1);
transform.Scale(1, -1);
return transform;
}
gfx::Transform ArCore::GetDepthUvFromScreenUvTransform() const {
return MatrixFromTransformedPoints(
TransformDisplayUvCoords(kInputCoordinatesForTransform));
}
ArCore::InitializeResult::InitializeResult(
const std::unordered_set<device::mojom::XRSessionFeature>& enabled_features,
std::optional<device::mojom::XRDepthConfig> depth_configuration)
: enabled_features(enabled_features),
depth_configuration(std::move(depth_configuration)) {}
ArCore::InitializeResult::InitializeResult(const InitializeResult& other) =
default;
ArCore::InitializeResult::~InitializeResult() = default;
ArCore::DepthSensingConfiguration::DepthSensingConfiguration(
std::vector<device::mojom::XRDepthUsage> depth_usage_preference,
std::vector<device::mojom::XRDepthDataFormat> depth_data_format_preference,
std::vector<device::mojom::XRDepthType> depth_type_request)
: depth_usage_preference(depth_usage_preference),
depth_data_format_preference(depth_data_format_preference),
depth_type_request(depth_type_request) {}
ArCore::DepthSensingConfiguration::DepthSensingConfiguration(
DepthSensingConfiguration&& other) = default;
ArCore::DepthSensingConfiguration::DepthSensingConfiguration(
const DepthSensingConfiguration& other) = default;
ArCore::DepthSensingConfiguration::~DepthSensingConfiguration() = default;
ArCore::DepthSensingConfiguration& ArCore::DepthSensingConfiguration::operator=(
const DepthSensingConfiguration& other) = default;
ArCore::DepthSensingConfiguration& ArCore::DepthSensingConfiguration::operator=(
DepthSensingConfiguration&& other) = default;
}