Skip to content
Snippets Groups Projects
Commit 834c741d authored by Lukas Schröder's avatar Lukas Schröder
Browse files

Merge branch 'feature/VREyeTypeFunction' into 'develop-4-22'

Feature/vr eye type function

See merge request VR-Group/ndisplayextensions!8
parents ae992b66 e8ebe40f
No related branches found
No related tags found
No related merge requests found
...@@ -283,3 +283,29 @@ void AVirtualRealityPawn::InitComponentReferences() ...@@ -283,3 +283,29 @@ void AVirtualRealityPawn::InitComponentReferences()
RightHand = Flystick; RightHand = Flystick;
} }
} }
EEyeType AVirtualRealityPawn::GetNodeEyeType() {
FDisplayClusterConfigClusterNode CurrentNodeConfig;
IDisplayCluster::Get().GetConfigMgr()->GetClusterNode(GetNodeName(), CurrentNodeConfig);
FString s = CurrentNodeConfig.ToString();
if (s.Contains("mono_eye")) {
TArray<FString> stringArray;
int32 count = s.ParseIntoArray(stringArray, TEXT(","));
for (int x = 0; x < count; x++) {
if (!stringArray[x].Contains("mono_eye")) continue;
if (stringArray[x].Contains("left")) {
return EEyeType::ET_STEREO_LEFT;
}
if (stringArray[x].Contains("right")) {
return EEyeType::ET_STEREO_RIGHT;
}
}
}
else {
return EEyeType::ET_MONO;
}
return EEyeType::ET_MONO;
}
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "DisplayClusterPawn.h" #include "DisplayClusterPawn.h"
#include "DisplayClusterSceneComponent.h" #include "DisplayClusterSceneComponent.h"
#include "MotionControllerComponent.h" #include "MotionControllerComponent.h"
#include "VirtualRealityPawn.generated.h" #include "VirtualRealityPawn.generated.h"
UENUM(BlueprintType) UENUM(BlueprintType)
...@@ -15,6 +14,12 @@ enum class EVRNavigationModes : uint8{ ...@@ -15,6 +14,12 @@ enum class EVRNavigationModes : uint8{
nav_mode_none UMETA(DisplayName = "Navigation Mode None"), nav_mode_none UMETA(DisplayName = "Navigation Mode None"),
nav_mode_fly UMETA(DisplayName = "Navigation Mode Fly") nav_mode_fly UMETA(DisplayName = "Navigation Mode Fly")
}; };
UENUM(BlueprintType)
enum class EEyeType : uint8 {
ET_MONO UMETA(DisplayName = "mono"),
ET_STEREO_RIGHT UMETA(DisplayName = "stero_right"),
ET_STEREO_LEFT UMETA(DisplayName = "stereo_left")
};
UCLASS() UCLASS()
class DISPLAYCLUSTEREXTENSIONS_API AVirtualRealityPawn : public ADisplayClusterPawn class DISPLAYCLUSTEREXTENSIONS_API AVirtualRealityPawn : public ADisplayClusterPawn
...@@ -36,6 +41,8 @@ public: ...@@ -36,6 +41,8 @@ public:
UFUNCTION(BlueprintPure, Category = "Pawn") static FString GetNodeName(); UFUNCTION(BlueprintPure, Category = "Pawn") static FString GetNodeName();
UFUNCTION(BlueprintPure, Category = "Pawn") static float GetEyeDistance(); UFUNCTION(BlueprintPure, Category = "Pawn") static float GetEyeDistance();
UFUNCTION(BlueprintPure, Category = "Pawn") static EEyeType GetNodeEyeType();
UFUNCTION(Category = "Pawn") float GetBaseTurnRate() const; UFUNCTION(Category = "Pawn") float GetBaseTurnRate() const;
UFUNCTION(Category = "Pawn") void SetBaseTurnRate(float Value); UFUNCTION(Category = "Pawn") void SetBaseTurnRate(float Value);
UFUNCTION(Category = "Pawn") UFloatingPawnMovement* GetFloatingPawnMovement(); UFUNCTION(Category = "Pawn") UFloatingPawnMovement* GetFloatingPawnMovement();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment