A Demo Project for the UnrealEngineSDK
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};
24
28USTRUCT(BlueprintType)
29struct PIXOCORE_API FAxisKeyData
30{
31 GENERATED_BODY()
32
33 UPROPERTY(EditAnywhere, BlueprintReadWrite)
34 EPlatform Platform;
35 UPROPERTY(EditAnywhere, BlueprintReadWrite)
36 TArray<FInputAxisKeyMapping> InputKeys;
37};
38
42USTRUCT(BlueprintType)
43struct PIXOCORE_API FPlatformInputSettings : public FTableRowBase
45 GENERATED_BODY()
46
47 UPROPERTY(EditAnywhere, BlueprintReadWrite)
48 FName InputName;
49 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Mapping", DisplayName = "Action Input Mapping")
50 TMap <EPlatform, FKey> InputMapping;
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Axis Mapping")
52 TArray<FAxisKeyData> AxisInputMapping;
53};
54
59UCLASS()
60class PIXOCORE_API UPixoVRInputAdapter : public UObject
61{
63
64public:
65 void ResolveMappings(const UDataTable* MappingsTable);
66
67private:
68 EPlatform GetPlatformType() const;
69 void RemoveMappings() const;
70 void AddMappings(const TArray<FPlatformInputSettings*>& CustomMappings);
71};
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 ...