Documentation for the Unreal C++ Plugin
Loading...
Searching...
No Matches
PixoVRInputAdapter.h
Go to the documentation of this file.
1// Copyright(c) Pixo Group. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/DataTable.h"
7#include "GameFramework/PlayerInput.h"
8#include "UObject/Object.h"
9#include "PixoVRInputAdapter.generated.h"
10
14UENUM(BlueprintType)
15enum class EPlatform : uint8
16{
17 NONE = 0 UMETA(DisplayName = "None"),
18 WINDOWS UMETA(DisplayName = "Desktop"),
19 VIVE UMETA(DisplayName = "HTC Vive"),
20 QUEST UMETA(DisplayName = "Oculus Quest"),
21 FOCUS_PLUS UMETA(DisplayName = "HTC Vive Focus Plus"),
22 PICO_NEO_2 UMETA(DisplayName = "Pico Neo 2"),
23 LENOVO_VRX UMETA(DisplayName = "Lenovo ThinkReality VRX"),
24};
25
29USTRUCT(BlueprintType)
30struct PIXOCORE_API FAxisKeyData
31{
32 GENERATED_BODY()
33
34 UPROPERTY(EditAnywhere, BlueprintReadWrite)
35 EPlatform Platform;
36 UPROPERTY(EditAnywhere, BlueprintReadWrite)
37 TArray<FInputAxisKeyMapping> InputKeys;
38};
39
43USTRUCT(BlueprintType)
44struct PIXOCORE_API FPlatformInputSettings : public FTableRowBase
46 GENERATED_BODY()
47
48 UPROPERTY(EditAnywhere, BlueprintReadWrite)
49 FName InputName;
50 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping", DisplayName = "Action Input Mapping")
51 TMap <EPlatform, FKey> InputMapping;
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Axis Mapping")
53 TArray<FAxisKeyData> AxisInputMapping;
54};
55
60UCLASS()
61class PIXOCORE_API UPixoVRInputAdapter : public UObject
62{
64
65public:
66 void ResolveMappings(const UDataTable* MappingsTable);
67
68private:
69 EPlatform GetPlatformType() const;
70 void RemoveMappings() const;
71 void AddMappings(const TArray<FPlatformInputSettings*>& CustomMappings);
72};
EPlatform
Enum representing different platforms.
A class for resolving and managing input mappings for different platforms.
Structure representing axis key data for different platforms.
EPlatform Platform
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray< FInputAxisKeyMapping > InputKeys
UPROPERTY(EditAnywhere, BlueprintReadWrite)
Structure representing platform-specific input settings.
FName InputName
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray< FAxisKeyData > AxisInputMapping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Axis Mapping")
TMap< EPlatform, FKey > InputMapping
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping", DisplayName = "Action Input ...