// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Perception_Spatial_H #define WINRT_Windows_Perception_Spatial_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.Perception.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Foundation.Numerics.2.h" #include "winrt/impl/Windows.Perception.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.System.RemoteSystems.2.h" #include "winrt/impl/Windows.Perception.Spatial.2.h" namespace winrt::impl { template auto consume_Windows_Perception_Spatial_ISpatialAnchor::CoordinateSystem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchor::RawCoordinateSystem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RawCoordinateSystem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RawCoordinateSystem(&value)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchor::RawCoordinateSystemAdjusted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_RawCoordinateSystemAdjusted(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RawCoordinateSystemAdjusted(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Perception_Spatial_ISpatialAnchor::RawCoordinateSystemAdjusted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, RawCoordinateSystemAdjusted(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialAnchor::RawCoordinateSystemAdjusted(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_RawCoordinateSystemAdjusted(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RawCoordinateSystemAdjusted(impl::bind_in(cookie)); } } template auto consume_Windows_Perception_Spatial_ISpatialAnchor2::RemovedByUser() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RemovedByUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RemovedByUser(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExportSufficiency::IsMinimallySufficient() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsMinimallySufficient(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMinimallySufficient(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExportSufficiency::SufficiencyLevel() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SufficiencyLevel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SufficiencyLevel(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExportSufficiency::RecommendedSufficiencyLevel() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RecommendedSufficiencyLevel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RecommendedSufficiencyLevel(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExporter::GetAnchorExportSufficiencyAsync(winrt::Windows::Perception::Spatial::SpatialAnchor const& anchor, winrt::Windows::Perception::Spatial::SpatialAnchorExportPurpose const& purpose) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAnchorExportSufficiencyAsync(*(void**)(&anchor), static_cast(purpose), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAnchorExportSufficiencyAsync(*(void**)(&anchor), static_cast(purpose), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExporter::TryExportAnchorAsync(winrt::Windows::Perception::Spatial::SpatialAnchor const& anchor, winrt::Windows::Perception::Spatial::SpatialAnchorExportPurpose const& purpose, winrt::Windows::Storage::Streams::IOutputStream const& stream) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryExportAnchorAsync(*(void**)(&anchor), static_cast(purpose), *(void**)(&stream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryExportAnchorAsync(*(void**)(&anchor), static_cast(purpose), *(void**)(&stream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExporterStatics::GetDefault() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefault(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&value)); } return winrt::Windows::Perception::Spatial::SpatialAnchorExporter{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorExporterStatics::RequestAccessAsync() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorManagerStatics::RequestStoreAsync() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestStoreAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestStoreAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorRawCoordinateSystemAdjustedEventArgs::OldRawCoordinateSystemToNewRawCoordinateSystemTransform() const { winrt::Windows::Foundation::Numerics::float4x4 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStatics::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryCreateRelativeTo(*(void**)(&coordinateSystem), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryCreateRelativeTo(*(void**)(&coordinateSystem), &value)); } return winrt::Windows::Perception::Spatial::SpatialAnchor{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStatics::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Foundation::Numerics::float3 const& position) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryCreateWithPositionRelativeTo(*(void**)(&coordinateSystem), impl::bind_in(position), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryCreateWithPositionRelativeTo(*(void**)(&coordinateSystem), impl::bind_in(position), &value)); } return winrt::Windows::Perception::Spatial::SpatialAnchor{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStatics::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Foundation::Numerics::float3 const& position, winrt::Windows::Foundation::Numerics::quaternion const& orientation) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryCreateWithPositionAndOrientationRelativeTo(*(void**)(&coordinateSystem), impl::bind_in(position), impl::bind_in(orientation), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryCreateWithPositionAndOrientationRelativeTo(*(void**)(&coordinateSystem), impl::bind_in(position), impl::bind_in(orientation), &value)); } return winrt::Windows::Perception::Spatial::SpatialAnchor{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStore::GetAllSavedAnchors() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAllSavedAnchors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllSavedAnchors(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStore::TrySave(param::hstring const& id, winrt::Windows::Perception::Spatial::SpatialAnchor const& anchor) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TrySave(*(void**)(&id), *(void**)(&anchor), &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TrySave(*(void**)(&id), *(void**)(&anchor), &succeeded)); } return succeeded; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStore::Remove(param::hstring const& id) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Remove(*(void**)(&id))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Remove(*(void**)(&id))); } } template auto consume_Windows_Perception_Spatial_ISpatialAnchorStore::Clear() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Clear()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Clear()); } } template auto consume_Windows_Perception_Spatial_ISpatialAnchorTransferManagerStatics::TryImportAnchorsAsync(winrt::Windows::Storage::Streams::IInputStream const& stream) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryImportAnchorsAsync(*(void**)(&stream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryImportAnchorsAsync(*(void**)(&stream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorTransferManagerStatics::TryExportAnchorsAsync(param::async_iterable> const& anchors, winrt::Windows::Storage::Streams::IOutputStream const& stream) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryExportAnchorsAsync(*(void**)(&anchors), *(void**)(&stream), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryExportAnchorsAsync(*(void**)(&anchors), *(void**)(&stream), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialAnchorTransferManagerStatics::RequestAccessAsync() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestAccessAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialBoundingVolumeStatics::FromBox(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingBox const& box) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromBox(*(void**)(&coordinateSystem), impl::bind_in(box), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromBox(*(void**)(&coordinateSystem), impl::bind_in(box), &value)); } return winrt::Windows::Perception::Spatial::SpatialBoundingVolume{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialBoundingVolumeStatics::FromOrientedBox(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingOrientedBox const& box) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromOrientedBox(*(void**)(&coordinateSystem), impl::bind_in(box), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromOrientedBox(*(void**)(&coordinateSystem), impl::bind_in(box), &value)); } return winrt::Windows::Perception::Spatial::SpatialBoundingVolume{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialBoundingVolumeStatics::FromSphere(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingSphere const& sphere) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromSphere(*(void**)(&coordinateSystem), impl::bind_in(sphere), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromSphere(*(void**)(&coordinateSystem), impl::bind_in(sphere), &value)); } return winrt::Windows::Perception::Spatial::SpatialBoundingVolume{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialBoundingVolumeStatics::FromFrustum(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingFrustum const& frustum) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromFrustum(*(void**)(&coordinateSystem), impl::bind_in(frustum), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromFrustum(*(void**)(&coordinateSystem), impl::bind_in(frustum), &value)); } return winrt::Windows::Perception::Spatial::SpatialBoundingVolume{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialCoordinateSystem::TryGetTransformTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& target) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetTransformTo(*(void**)(&target), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetTransformTo(*(void**)(&target), &value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntity::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntity::Anchor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Anchor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Anchor(&value)); } return winrt::Windows::Perception::Spatial::SpatialAnchor{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntity::Properties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityAddedEventArgs::Entity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Entity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Entity(&value)); } return winrt::Windows::Perception::Spatial::SpatialEntity{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityFactory::CreateWithSpatialAnchor(winrt::Windows::Perception::Spatial::SpatialAnchor const& spatialAnchor) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithSpatialAnchor(*(void**)(&spatialAnchor), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithSpatialAnchor(*(void**)(&spatialAnchor), &value)); } return winrt::Windows::Perception::Spatial::SpatialEntity{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityFactory::CreateWithSpatialAnchorAndProperties(winrt::Windows::Perception::Spatial::SpatialAnchor const& spatialAnchor, winrt::Windows::Foundation::Collections::ValueSet const& propertySet) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithSpatialAnchorAndProperties(*(void**)(&spatialAnchor), *(void**)(&propertySet), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithSpatialAnchorAndProperties(*(void**)(&spatialAnchor), *(void**)(&propertySet), &value)); } return winrt::Windows::Perception::Spatial::SpatialEntity{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityRemovedEventArgs::Entity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Entity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Entity(&value)); } return winrt::Windows::Perception::Spatial::SpatialEntity{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityStore::SaveAsync(winrt::Windows::Perception::Spatial::SpatialEntity const& entity) const { void* action{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SaveAsync(*(void**)(&entity), &action)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SaveAsync(*(void**)(&entity), &action)); } return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityStore::RemoveAsync(winrt::Windows::Perception::Spatial::SpatialEntity const& entity) const { void* action{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveAsync(*(void**)(&entity), &action)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveAsync(*(void**)(&entity), &action)); } return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityStore::CreateEntityWatcher() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateEntityWatcher(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateEntityWatcher(&value)); } return winrt::Windows::Perception::Spatial::SpatialEntityWatcher{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityStoreStatics::IsSupported() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialEntityStoreStatics::TryGet(winrt::Windows::System::RemoteSystems::RemoteSystemSession const& session) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetForRemoteSystemSession(*(void**)(&session), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetForRemoteSystemSession(*(void**)(&session), &value)); } return winrt::Windows::Perception::Spatial::SpatialEntityStore{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityUpdatedEventArgs::Entity() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Entity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Entity(&value)); } return winrt::Windows::Perception::Spatial::SpatialEntity{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Status() const { winrt::Windows::Perception::Spatial::SpatialEntityWatcherStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Added(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Added(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Added(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Added(impl::bind_in(token)); } } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Updated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Updated(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Updated(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Updated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Updated(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Updated(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Removed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Removed(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::EnumerationCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::EnumerationCompleted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Start() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_Perception_Spatial_ISpatialEntityWatcher::Stop() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_Perception_Spatial_ISpatialLocation::Position() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation::Orientation() const { winrt::Windows::Foundation::Numerics::quaternion value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Orientation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Orientation(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation::AbsoluteLinearVelocity() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteLinearVelocity(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteLinearVelocity(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation::AbsoluteLinearAcceleration() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteLinearAcceleration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteLinearAcceleration(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation::AbsoluteAngularVelocity() const { winrt::Windows::Foundation::Numerics::quaternion value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteAngularVelocity(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteAngularVelocity(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation::AbsoluteAngularAcceleration() const { winrt::Windows::Foundation::Numerics::quaternion value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteAngularAcceleration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteAngularAcceleration(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation2::AbsoluteAngularVelocityAxisAngle() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteAngularVelocityAxisAngle(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteAngularVelocityAxisAngle(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocation2::AbsoluteAngularAccelerationAxisAngle() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AbsoluteAngularAccelerationAxisAngle(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AbsoluteAngularAccelerationAxisAngle(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::Locatability() const { winrt::Windows::Perception::Spatial::SpatialLocatability value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Locatability(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Locatability(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::LocatabilityChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_LocatabilityChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_LocatabilityChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::LocatabilityChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, LocatabilityChanged(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialLocator::LocatabilityChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_LocatabilityChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_LocatabilityChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Perception_Spatial_ISpatialLocator::PositionalTrackingDeactivating(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PositionalTrackingDeactivating(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PositionalTrackingDeactivating(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::PositionalTrackingDeactivating(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PositionalTrackingDeactivating(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialLocator::PositionalTrackingDeactivating(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PositionalTrackingDeactivating(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PositionalTrackingDeactivating(impl::bind_in(cookie)); } } template auto consume_Windows_Perception_Spatial_ISpatialLocator::TryLocateAtTimestamp(winrt::Windows::Perception::PerceptionTimestamp const& timestamp, winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryLocateAtTimestamp(*(void**)(×tamp), *(void**)(&coordinateSystem), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryLocateAtTimestamp(*(void**)(×tamp), *(void**)(&coordinateSystem), &value)); } return winrt::Windows::Perception::Spatial::SpatialLocation{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeading(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeading(&value)); } return winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(winrt::Windows::Foundation::Numerics::float3 const& relativePosition) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(impl::bind_in(relativePosition), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(impl::bind_in(relativePosition), &value)); } return winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(winrt::Windows::Foundation::Numerics::float3 const& relativePosition, winrt::Windows::Foundation::Numerics::quaternion const& relativeOrientation) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), &value)); } return winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateAttachedFrameOfReferenceAtCurrentHeading(winrt::Windows::Foundation::Numerics::float3 const& relativePosition, winrt::Windows::Foundation::Numerics::quaternion const& relativeOrientation, double relativeHeadingInRadians) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), relativeHeadingInRadians, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), relativeHeadingInRadians, &value)); } return winrt::Windows::Perception::Spatial::SpatialLocatorAttachedFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocation(&value)); } return winrt::Windows::Perception::Spatial::SpatialStationaryFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(winrt::Windows::Foundation::Numerics::float3 const& relativePosition) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(impl::bind_in(relativePosition), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(impl::bind_in(relativePosition), &value)); } return winrt::Windows::Perception::Spatial::SpatialStationaryFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(winrt::Windows::Foundation::Numerics::float3 const& relativePosition, winrt::Windows::Foundation::Numerics::quaternion const& relativeOrientation) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), &value)); } return winrt::Windows::Perception::Spatial::SpatialStationaryFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocator::CreateStationaryFrameOfReferenceAtCurrentLocation(winrt::Windows::Foundation::Numerics::float3 const& relativePosition, winrt::Windows::Foundation::Numerics::quaternion const& relativeOrientation, double relativeHeadingInRadians) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), relativeHeadingInRadians, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(impl::bind_in(relativePosition), impl::bind_in(relativeOrientation), relativeHeadingInRadians, &value)); } return winrt::Windows::Perception::Spatial::SpatialStationaryFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::RelativePosition() const { winrt::Windows::Foundation::Numerics::float3 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RelativePosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RelativePosition(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::RelativePosition(winrt::Windows::Foundation::Numerics::float3 const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_RelativePosition(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RelativePosition(impl::bind_in(value))); } } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::RelativeOrientation() const { winrt::Windows::Foundation::Numerics::quaternion value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RelativeOrientation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RelativeOrientation(put_abi(value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::RelativeOrientation(winrt::Windows::Foundation::Numerics::quaternion const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_RelativeOrientation(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RelativeOrientation(impl::bind_in(value))); } } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::AdjustHeading(double headingOffsetInRadians) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AdjustHeading(headingOffsetInRadians)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AdjustHeading(headingOffsetInRadians)); } } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::GetStationaryCoordinateSystemAtTimestamp(winrt::Windows::Perception::PerceptionTimestamp const& timestamp) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetStationaryCoordinateSystemAtTimestamp(*(void**)(×tamp), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStationaryCoordinateSystemAtTimestamp(*(void**)(×tamp), &value)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorAttachedFrameOfReference::TryGetRelativeHeadingAtTimestamp(winrt::Windows::Perception::PerceptionTimestamp const& timestamp) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetRelativeHeadingAtTimestamp(*(void**)(×tamp), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetRelativeHeadingAtTimestamp(*(void**)(×tamp), &value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorPositionalTrackingDeactivatingEventArgs::Canceled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Canceled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Canceled(&value)); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialLocatorPositionalTrackingDeactivatingEventArgs::Canceled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Canceled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Canceled(value)); } } template auto consume_Windows_Perception_Spatial_ISpatialLocatorStatics::GetDefault() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefault(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&value)); } return winrt::Windows::Perception::Spatial::SpatialLocator{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReference::CoordinateSystem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReference::MovementRange() const { winrt::Windows::Perception::Spatial::SpatialMovementRange value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MovementRange(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MovementRange(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReference::LookDirectionRange() const { winrt::Windows::Perception::Spatial::SpatialLookDirectionRange value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_LookDirectionRange(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LookDirectionRange(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReference::GetCoordinateSystemAtCurrentLocation(winrt::Windows::Perception::Spatial::SpatialLocator const& locator) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCoordinateSystemAtCurrentLocation(*(void**)(&locator), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCoordinateSystemAtCurrentLocation(*(void**)(&locator), &result)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ result, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReference::TryGetMovementBounds(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem) const { uint32_t value_impl_size{}; winrt::Windows::Foundation::Numerics::float3* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetMovementBounds(*(void**)(&coordinateSystem), &value_impl_size, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetMovementBounds(*(void**)(&coordinateSystem), &value_impl_size, &value)); } return com_array{ value, value_impl_size, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReferenceStatics::Current() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Current(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Current(&value)); } return winrt::Windows::Perception::Spatial::SpatialStageFrameOfReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReferenceStatics::CurrentChanged(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CurrentChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CurrentChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReferenceStatics::CurrentChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, CurrentChanged(handler)); } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReferenceStatics::CurrentChanged(winrt::event_token const& cookie) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_CurrentChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CurrentChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Perception_Spatial_ISpatialStageFrameOfReferenceStatics::RequestNewStageAsync() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RequestNewStageAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestNewStageAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Perception_Spatial_ISpatialStationaryFrameOfReference::CoordinateSystem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CoordinateSystem(&value)); } return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoordinateSystem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RawCoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RawCoordinateSystem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_RawCoordinateSystemAdjusted(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().RawCoordinateSystemAdjusted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RawCoordinateSystemAdjusted(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RawCoordinateSystemAdjusted(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RemovedByUser(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RemovedByUser()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsMinimallySufficient(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMinimallySufficient()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SufficiencyLevel(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SufficiencyLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RecommendedSufficiencyLevel(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RecommendedSufficiencyLevel()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAnchorExportSufficiencyAsync(void* anchor, int32_t purpose, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetAnchorExportSufficiencyAsync(*reinterpret_cast(&anchor), *reinterpret_cast(&purpose))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryExportAnchorAsync(void* anchor, int32_t purpose, void* stream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryExportAnchorAsync(*reinterpret_cast(&anchor), *reinterpret_cast(&purpose), *reinterpret_cast(&stream))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestStoreAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestStoreAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(winrt::Windows::Foundation::Numerics::float4x4* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldRawCoordinateSystemToNewRawCoordinateSystemTransform()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryCreateRelativeTo(void* coordinateSystem, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryCreateWithPositionRelativeTo(void* coordinateSystem, winrt::Windows::Foundation::Numerics::float3 position, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryCreateWithPositionAndOrientationRelativeTo(void* coordinateSystem, winrt::Windows::Foundation::Numerics::float3 position, winrt::Windows::Foundation::Numerics::quaternion orientation, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryCreateRelativeTo(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&position), *reinterpret_cast(&orientation))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAllSavedAnchors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetAllSavedAnchors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySave(void* id, void* anchor, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TrySave(*reinterpret_cast(&id), *reinterpret_cast(&anchor))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Remove(void* id) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Remove(*reinterpret_cast(&id)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Clear() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Clear(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryImportAnchorsAsync(void* stream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().TryImportAnchorsAsync(*reinterpret_cast(&stream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryExportAnchorsAsync(void* anchors, void* stream, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryExportAnchorsAsync(*reinterpret_cast> const*>(&anchors), *reinterpret_cast(&stream))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestAccessAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromBox(void* coordinateSystem, struct struct_Windows_Perception_Spatial_SpatialBoundingBox box, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromOrientedBox(void* coordinateSystem, struct struct_Windows_Perception_Spatial_SpatialBoundingOrientedBox box, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromOrientedBox(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&box))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromSphere(void* coordinateSystem, struct struct_Windows_Perception_Spatial_SpatialBoundingSphere sphere, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromSphere(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&sphere))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromFrustum(void* coordinateSystem, struct struct_Windows_Perception_Spatial_SpatialBoundingFrustum frustum, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromFrustum(*reinterpret_cast(&coordinateSystem), *reinterpret_cast(&frustum))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryGetTransformTo(void* target, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().TryGetTransformTo(*reinterpret_cast(&target))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Anchor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Anchor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Entity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Entity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithSpatialAnchor(void* spatialAnchor, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateWithSpatialAnchor(*reinterpret_cast(&spatialAnchor))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithSpatialAnchorAndProperties(void* spatialAnchor, void* propertySet, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateWithSpatialAnchorAndProperties(*reinterpret_cast(&spatialAnchor), *reinterpret_cast(&propertySet))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Entity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Entity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SaveAsync(void* entity, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().SaveAsync(*reinterpret_cast(&entity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveAsync(void* entity, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().RemoveAsync(*reinterpret_cast(&entity))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateEntityWatcher(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateEntityWatcher()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetForRemoteSystemSession(void* session, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryGet(*reinterpret_cast(&session))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Entity(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Entity()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Updated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Updated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Updated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Updated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Position(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Orientation(winrt::Windows::Foundation::Numerics::quaternion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Orientation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AbsoluteLinearVelocity(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteLinearVelocity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AbsoluteLinearAcceleration(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteLinearAcceleration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AbsoluteAngularVelocity(winrt::Windows::Foundation::Numerics::quaternion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteAngularVelocity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AbsoluteAngularAcceleration(winrt::Windows::Foundation::Numerics::quaternion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteAngularAcceleration()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AbsoluteAngularVelocityAxisAngle(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteAngularVelocityAxisAngle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AbsoluteAngularAccelerationAxisAngle(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AbsoluteAngularAccelerationAxisAngle()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Locatability(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Locatability()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_LocatabilityChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().LocatabilityChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_LocatabilityChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().LocatabilityChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PositionalTrackingDeactivating(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PositionalTrackingDeactivating(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PositionalTrackingDeactivating(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PositionalTrackingDeactivating(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall TryLocateAtTimestamp(void* timestamp, void* coordinateSystem, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryLocateAtTimestamp(*reinterpret_cast(×tamp), *reinterpret_cast(&coordinateSystem))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAttachedFrameOfReferenceAtCurrentHeading(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(winrt::Windows::Foundation::Numerics::float3 relativePosition, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(winrt::Windows::Foundation::Numerics::float3 relativePosition, winrt::Windows::Foundation::Numerics::quaternion relativeOrientation, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(winrt::Windows::Foundation::Numerics::float3 relativePosition, winrt::Windows::Foundation::Numerics::quaternion relativeOrientation, double relativeHeadingInRadians, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateAttachedFrameOfReferenceAtCurrentHeading(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateStationaryFrameOfReferenceAtCurrentLocation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(winrt::Windows::Foundation::Numerics::float3 relativePosition, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(winrt::Windows::Foundation::Numerics::float3 relativePosition, winrt::Windows::Foundation::Numerics::quaternion relativeOrientation, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(winrt::Windows::Foundation::Numerics::float3 relativePosition, winrt::Windows::Foundation::Numerics::quaternion relativeOrientation, double relativeHeadingInRadians, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateStationaryFrameOfReferenceAtCurrentLocation(*reinterpret_cast(&relativePosition), *reinterpret_cast(&relativeOrientation), relativeHeadingInRadians)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RelativePosition(winrt::Windows::Foundation::Numerics::float3* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RelativePosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RelativePosition(winrt::Windows::Foundation::Numerics::float3 value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RelativePosition(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RelativeOrientation(winrt::Windows::Foundation::Numerics::quaternion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RelativeOrientation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RelativeOrientation(winrt::Windows::Foundation::Numerics::quaternion value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RelativeOrientation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AdjustHeading(double headingOffsetInRadians) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AdjustHeading(headingOffsetInRadians); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetStationaryCoordinateSystemAtTimestamp(void* timestamp, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetStationaryCoordinateSystemAtTimestamp(*reinterpret_cast(×tamp))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetRelativeHeadingAtTimestamp(void* timestamp, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().TryGetRelativeHeadingAtTimestamp(*reinterpret_cast(×tamp))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Canceled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Canceled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Canceled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Canceled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoordinateSystem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MovementRange(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MovementRange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LookDirectionRange(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LookDirectionRange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCoordinateSystemAtCurrentLocation(void* locator, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCoordinateSystemAtCurrentLocation(*reinterpret_cast(&locator))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetMovementBounds(void* coordinateSystem, uint32_t* __valueSize, winrt::Windows::Foundation::Numerics::float3** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); std::tie(*__valueSize, *value) = detach_abi(this->shim().TryGetMovementBounds(*reinterpret_cast(&coordinateSystem))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_CurrentChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().CurrentChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CurrentChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CurrentChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall RequestNewStageAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().RequestNewStageAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoordinateSystem()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Perception::Spatial { inline auto SpatialAnchor::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem) { return impl::call_factory([&](ISpatialAnchorStatics const& f) { return f.TryCreateRelativeTo(coordinateSystem); }); } inline auto SpatialAnchor::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Foundation::Numerics::float3 const& position) { return impl::call_factory([&](ISpatialAnchorStatics const& f) { return f.TryCreateRelativeTo(coordinateSystem, position); }); } inline auto SpatialAnchor::TryCreateRelativeTo(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Foundation::Numerics::float3 const& position, winrt::Windows::Foundation::Numerics::quaternion const& orientation) { return impl::call_factory([&](ISpatialAnchorStatics const& f) { return f.TryCreateRelativeTo(coordinateSystem, position, orientation); }); } inline auto SpatialAnchorExporter::GetDefault() { return impl::call_factory_cast([](ISpatialAnchorExporterStatics const& f) { return f.GetDefault(); }); } inline auto SpatialAnchorExporter::RequestAccessAsync() { return impl::call_factory_cast(*)(ISpatialAnchorExporterStatics const&), SpatialAnchorExporter, ISpatialAnchorExporterStatics>([](ISpatialAnchorExporterStatics const& f) { return f.RequestAccessAsync(); }); } inline auto SpatialAnchorManager::RequestStoreAsync() { return impl::call_factory_cast(*)(ISpatialAnchorManagerStatics const&), SpatialAnchorManager, ISpatialAnchorManagerStatics>([](ISpatialAnchorManagerStatics const& f) { return f.RequestStoreAsync(); }); } inline auto SpatialAnchorTransferManager::TryImportAnchorsAsync(winrt::Windows::Storage::Streams::IInputStream const& stream) { return impl::call_factory([&](ISpatialAnchorTransferManagerStatics const& f) { return f.TryImportAnchorsAsync(stream); }); } inline auto SpatialAnchorTransferManager::TryExportAnchorsAsync(param::async_iterable> const& anchors, winrt::Windows::Storage::Streams::IOutputStream const& stream) { return impl::call_factory([&](ISpatialAnchorTransferManagerStatics const& f) { return f.TryExportAnchorsAsync(anchors, stream); }); } inline auto SpatialAnchorTransferManager::RequestAccessAsync() { return impl::call_factory_cast(*)(ISpatialAnchorTransferManagerStatics const&), SpatialAnchorTransferManager, ISpatialAnchorTransferManagerStatics>([](ISpatialAnchorTransferManagerStatics const& f) { return f.RequestAccessAsync(); }); } inline auto SpatialBoundingVolume::FromBox(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingBox const& box) { return impl::call_factory([&](ISpatialBoundingVolumeStatics const& f) { return f.FromBox(coordinateSystem, box); }); } inline auto SpatialBoundingVolume::FromOrientedBox(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingOrientedBox const& box) { return impl::call_factory([&](ISpatialBoundingVolumeStatics const& f) { return f.FromOrientedBox(coordinateSystem, box); }); } inline auto SpatialBoundingVolume::FromSphere(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingSphere const& sphere) { return impl::call_factory([&](ISpatialBoundingVolumeStatics const& f) { return f.FromSphere(coordinateSystem, sphere); }); } inline auto SpatialBoundingVolume::FromFrustum(winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem, winrt::Windows::Perception::Spatial::SpatialBoundingFrustum const& frustum) { return impl::call_factory([&](ISpatialBoundingVolumeStatics const& f) { return f.FromFrustum(coordinateSystem, frustum); }); } inline SpatialEntity::SpatialEntity(winrt::Windows::Perception::Spatial::SpatialAnchor const& spatialAnchor) : SpatialEntity(impl::call_factory([&](ISpatialEntityFactory const& f) { return f.CreateWithSpatialAnchor(spatialAnchor); })) { } inline SpatialEntity::SpatialEntity(winrt::Windows::Perception::Spatial::SpatialAnchor const& spatialAnchor, winrt::Windows::Foundation::Collections::ValueSet const& propertySet) : SpatialEntity(impl::call_factory([&](ISpatialEntityFactory const& f) { return f.CreateWithSpatialAnchorAndProperties(spatialAnchor, propertySet); })) { } inline auto SpatialEntityStore::IsSupported() { return impl::call_factory_cast([](ISpatialEntityStoreStatics const& f) { return f.IsSupported(); }); } inline auto SpatialEntityStore::TryGet(winrt::Windows::System::RemoteSystems::RemoteSystemSession const& session) { return impl::call_factory([&](ISpatialEntityStoreStatics const& f) { return f.TryGet(session); }); } inline auto SpatialLocator::GetDefault() { return impl::call_factory_cast([](ISpatialLocatorStatics const& f) { return f.GetDefault(); }); } inline auto SpatialStageFrameOfReference::Current() { return impl::call_factory_cast([](ISpatialStageFrameOfReferenceStatics const& f) { return f.Current(); }); } inline auto SpatialStageFrameOfReference::CurrentChanged(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ISpatialStageFrameOfReferenceStatics const& f) { return f.CurrentChanged(handler); }); } inline auto SpatialStageFrameOfReference::CurrentChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return SpatialStageFrameOfReference::CurrentChanged_revoker{ f, f.CurrentChanged(handler) }; } inline auto SpatialStageFrameOfReference::CurrentChanged(winrt::event_token const& cookie) { impl::call_factory([&](ISpatialStageFrameOfReferenceStatics const& f) { return f.CurrentChanged(cookie); }); } inline auto SpatialStageFrameOfReference::RequestNewStageAsync() { return impl::call_factory_cast(*)(ISpatialStageFrameOfReferenceStatics const&), SpatialStageFrameOfReference, ISpatialStageFrameOfReferenceStatics>([](ISpatialStageFrameOfReferenceStatics const& f) { return f.RequestNewStageAsync(); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif