Adapters
The adapter layer is how a platform/device integration feeds hand-tracking and play-area data into the SDK, and how game code reads it back. There are two pure-C++ interfaces — IHandsAdapter and IBoundaryAdapter — and a template registry, AdapterFactory<TAdapter>, with two concrete factories, HandsAdapterFactory and BoundaryAdapterFactory.
Everything on this page is C++ only. None of these types is a UE UINTERFACE and none is Blueprint-exposed. An integration subclasses an interface and registers an instance with the matching factory; game code calls the factory's GetAdapter() to obtain the active adapter for the current platform.
Unreal Engine uses centimeters for position and degrees for rotation; the AR 51 native domain uses meters. Positions returned by these adapters are documented as UE centimeters. ⚠️ Confirm whether the SDK converts AR 51 meters → UE cm at the adapter boundary, or whether the caller receives raw native units. For IBoundaryAdapter::GetPoints the exact space (world vs tracking) and whether points are 2D-on-floor or full 3D is also unverified.
IHandsAdapter
pure C++ interface C++ onlyAR51SDK_API
class AR51SDK_API IHandsAdapter
An abstract interface a platform/device integration implements to feed hand-tracking data into the SDK. Not a UE UINTERFACE — no Blueprint exposure. Game code consumes it (typically via HandsAdapterFactory::GetAdapter()) and reads the per-hand joint sets. Joints are returned as HandJointInfo — empty or zero-confidence entries indicate no tracking.
IHandsAdapter method summary
| Method | Returns | |
|---|---|---|
GetSourceDevice | FString | C++ only · virtual, has default |
GetRightJointInfos | TArray<HandJointInfo> | C++ only · pure virtual |
GetLeftJointInfos | TArray<HandJointInfo> | C++ only · pure virtual |
IBoundaryAdapter
pure C++ interface C++ onlyAR51SDK_API
class AR51SDK_API IBoundaryAdapter
An abstract interface that supplies the play-area / guardian boundary polygon. Not a UE UINTERFACE. Game code consumes it via BoundaryAdapterFactory::GetAdapter(); an integration implements it to provide the boundary geometry for its platform.
IBoundaryAdapter method summary
| Method | Returns | |
|---|---|---|
GetBoundaryName | FString | C++ only · virtual, has default |
GetPoints | TArray<FVector> | C++ only · pure virtual · ⚠️ UE cm |
IHandsAdapter / IBoundaryAdapter method details
GetSourceDevice
virtual FString GetSourceDevice() const;
Name of the tracking source. The default implementation returns "NoSource"; override it to identify the device/backend providing hand data.
"NoSource" if not overriddenGetRightJointInfos / GetLeftJointInfos
virtual TArray<HandJointInfo> GetRightJointInfos() = 0;
virtual TArray<HandJointInfo> GetLeftJointInfos() = 0;
The current right-hand and left-hand joint sets. Both are pure virtual — an implementation must provide them. Empty arrays or zero-confidence HandJointInfo entries indicate the hand is not currently tracked.
if (IHandsAdapter* Hands = HandsAdapterFactory::GetAdapter())
{
const TArray<HandJointInfo> Right = Hands->GetRightJointInfos();
// Gate on whole-hand confidence, then read positions (UE cm):
const TArray<FVector> Pts = HandJointInfo::GetConfidentPositions(Right, 0.5f);
if (Pts.Num() == 0)
UE_LOG(LogTemp, Verbose, TEXT("Right hand not confidently tracked"));
}
GetBoundaryName
virtual FString GetBoundaryName() const;
Boundary identifier. The default implementation returns "Native Default Boundary"; override to name the boundary source.
"Native Default Boundary" if not overriddenGetPoints
virtual TArray<FVector> GetPoints() const = 0;
The boundary polygon as an ordered list of points — typically a floor-plane loop. Pure virtual.
if (IBoundaryAdapter* Boundary = BoundaryAdapterFactory::GetAdapter())
{
const TArray<FVector> Loop = Boundary->GetPoints(); // UE cm ⚠️
for (int32 i = 0; i < Loop.Num(); ++i)
DrawDebugLine(GetWorld(), Loop[i], Loop[(i + 1) % Loop.Num()], FColor::Green);
}
AdapterFactory<TAdapter>
template base class C++ only header-onlytemplate<typename TAdapter>
class AdapterFactory
A per-adapter-type singleton registry keyed by platform. Game code calls the static GetAdapter() accessors to obtain the active adapter; integrations call Register / RegisterAllPlatforms to publish their implementations. Not Blueprint-exposed. The two concrete factories (HandsAdapterFactory, BoundaryAdapterFactory) inherit this full static API.
Lookup precedence: an adapter registered via RegisterAllPlatforms wins for every platform, taking precedence over per-platform entries.
A GetAdapter(AR51::PlatformType) overload also exists, but it takes the internal AR51::PlatformType (wire/proto) enum and is internal. Public callers should use the EPlatformTypes overload or the no-arg GetAdapter(). The EmptyHandsAdapter platform fallback and the AR51::PlatformType ↔ EPlatformTypes converters are also internal.
AdapterFactory method summary
Static
| Method | Returns | |
|---|---|---|
Clear | void | C++ only |
GetAdapter(platform) | TAdapter* | C++ only |
GetAdapter() | TAdapter* | C++ only · resolves platform from AAR51SDK |
Register | void | C++ only |
RegisterAllPlatforms | void | C++ only |
Clear
static void Clear();
Drops all registered adapters — both the per-platform map and the all-platform override.
GetAdapter(platform)
static TAdapter* GetAdapter(EPlatformTypes platform);
Returns the adapter registered for a specific UE-facing platform, or nullptr if none is registered (an all-platform override, if present, still wins).
nullptrGetAdapter
static TAdapter* GetAdapter();
The normal game-side entry point. Resolves the current platform from the in-level SDK actor — AAR51SDK::Instance()->Platform (an EPlatformTypes) — and returns the adapter registered for it. Logs an error and returns nullptr if no AAR51SDK actor is present in the level.
nullptr if no SDK actor exists// HandsAdapterFactory and BoundaryAdapterFactory inherit this:
if (IHandsAdapter* Hands = HandsAdapterFactory::GetAdapter())
UE_LOG(LogTemp, Log, TEXT("Hands source: %s"), *Hands->GetSourceDevice());
Register / RegisterAllPlatforms
static void Register(AR51::PlatformType platform, TAdapter* adapter);
static void RegisterAllPlatforms(TAdapter* adapter);
Publish an adapter into the registry. Register binds one adapter to a single platform — a null adapter is ignored (logged), and re-registering a platform overrides the previous entry (logged). RegisterAllPlatforms registers a single adapter that wins for every platform, taking precedence over per-platform entries during lookup.
EPlatformTypes lookup overloads are the public read path)HandsAdapterFactory
concrete factory C++ onlyclass HandsAdapterFactory : public AdapterFactory<IHandsAdapter>
The factory for IHandsAdapter. Inherits the full static API from AdapterFactory<TAdapter>. Call HandsAdapterFactory::GetAdapter() to obtain the active hands adapter for the running platform.
BoundaryAdapterFactory
concrete factory C++ onlyclass BoundaryAdapterFactory : public AdapterFactory<IBoundaryAdapter>
The factory for IBoundaryAdapter. Inherits the full static API from AdapterFactory<TAdapter>. Call BoundaryAdapterFactory::GetAdapter() to obtain the active boundary adapter for the running platform.
See also
HandJointInfo— the per-joint pose struct returned byIHandsAdapterEPlatformTypes— the platform enum used to key the registryAAR51SDK— supplies thePlatformthat the no-argGetAdapter()resolves against- Hands, controllers, boundary & anchors — the area overview, data model, and anchor components
- Class index — all Unreal SDK types