UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ARPin.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "ARTypes.h"
6#include "ARPin.generated.h"
7
8#define UE_API AUGMENTEDREALITY_API
9
11class USceneComponent;
12
13UCLASS(MinimalAPI, BlueprintType, Experimental, Category="AR AugmentedReality")
15{
17
18public:
20
26 UFUNCTION(BlueprintPure, Category="AR AugmentedReality|Pin")
27 UE_API FTransform GetLocalToTrackingTransform() const;
28
29
34 UFUNCTION(BlueprintPure, Category="AR AugmentedReality|Pin")
35 UE_API FTransform GetLocalToWorldTransform() const;
36
40 UFUNCTION(BlueprintPure, Category = "AR AugmentedReality|Pin")
41 UE_API EARTrackingState GetTrackingState() const;
42
46 UFUNCTION(BlueprintPure, Category="AR AugmentedReality|Pin")
47 UE_API UARTrackedGeometry* GetTrackedGeometry() const;
48
50 UFUNCTION(BlueprintPure, Category="AR AugmentedReality|Pin")
51 UE_API USceneComponent* GetPinnedComponent() const;
52
53 UFUNCTION()
54 UE_API virtual void DebugDraw( UWorld* World, const FLinearColor& Color, float Scale = 5.0f, float PersistForSeconds = 0.0f) const;
55
56 UFUNCTION(BlueprintPure, Category="AR AugmentedReality|Pin")
57 UE_API FName GetDebugName() const;
58
59 UE_API void SetOnARTrackingStateChanged( const FOnARTrackingStateChanged& InHandler );
60
61 UE_API void SetOnARTransformUpdated( const FOnARTransformUpdated& InHandler );
62
64 {
65 NativeResource = InNativeResource;
66 }
67
69 {
70 return NativeResource;
71 }
72
73public:
74
75 UE_API FTransform GetLocalToTrackingTransform_NoAlignment() const;
76
78 UE_API void OnTrackingStateChanged(EARTrackingState NewTrackingState);
79
81 UE_API void OnTransformUpdated(const FTransform& NewLocalToTrackingTransform);
82
84 UE_API void UpdateAlignmentTransform( const FTransform& NewAlignmentTransform );
85
86 void SetPinnedComponent(USceneComponent* InComponentToPin)
87 {
88 PinnedComponent = InComponentToPin;
89 }
90
91protected:
93
94private:
95 static UE_API uint32 DebugPinId;
96
97 UPROPERTY()
98 TObjectPtr<UARTrackedGeometry> TrackedGeometry;
99
100 UPROPERTY()
101 TObjectPtr<USceneComponent> PinnedComponent;
102
103 UPROPERTY()
104 FTransform LocalToTrackingTransform;
105
106 UPROPERTY()
107 FTransform LocalToAlignedTrackingTransform;
108
109 UPROPERTY()
110 EARTrackingState TrackingState;
111
113
114 FName DebugName;
115
116 UPROPERTY(BlueprintAssignable, Category="AR AugmentedReality|Pin")
117 FOnARTrackingStateChanged OnARTrackingStateChanged;
118
119 UPROPERTY(BlueprintAssignable, Category="AR AugmentedReality|Pin")
120 FOnARTransformUpdated OnARTransformUpdated;
121
122 // The native resource pointer on the AR platform.
123 void* NativeResource;
124};
125
126#undef UE_API
#define UE_API
Definition ARPin.h:8
EARTrackingState
Definition ARTypes.h:30
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
ESPMode
Definition SharedPointerFwd.h:12
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition ARSupportInterface.h:29
Definition NameTypes.h:617
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition SharedPointer.h:1295
Definition ARPin.h:15
void * GetNativeResource()
Definition ARPin.h:68
void SetPinnedComponent(USceneComponent *InComponentToPin)
Definition ARPin.h:86
void SetNativeResource(void *InNativeResource)
Definition ARPin.h:63
Definition ARTrackable.h:17
Definition Object.h:95
Definition World.h:918
Definition RobinHoodHashTable.h:18
Definition Color.h:48
Definition ObjectPtr.h:488