Skip to content
Snippets Groups Projects
Commit 62366312 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Huge reformatting / cosmetic fixes commit.

parent ce188108
Branches
Tags
1 merge request!36Huge reformatting / cosmetic fixes commit.
...@@ -31,7 +31,8 @@ class RWTHVRTOOLKIT_API UDemoConfig : public UDeveloperSettings ...@@ -31,7 +31,8 @@ class RWTHVRTOOLKIT_API UDemoConfig : public UDeveloperSettings
if (FApp::GetBuildTargetType() == EBuildTargetType::Editor) return; if (FApp::GetBuildTargetType() == EBuildTargetType::Editor) return;
// Load config file (does nothing if not exist) // Load config file (does nothing if not exist)
const FString ConfigFile = FPaths::Combine(FPaths::ProjectConfigDir(), FPaths::GetCleanFilename(GetClass()->GetConfigName())); const FString ConfigFile = FPaths::Combine(FPaths::ProjectConfigDir(),
FPaths::GetCleanFilename(GetClass()->GetConfigName()));
FConfigCacheIni Config(EConfigCacheType::DiskBacked); FConfigCacheIni Config(EConfigCacheType::DiskBacked);
Config.LoadFile(ConfigFile); Config.LoadFile(ConfigFile);
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "VirtualRealityUtilities.generated.h" #include "VirtualRealityUtilities.generated.h"
/** /**
* Custom log category for all RWTHVRToolkit related components * Custom log category for all RWTHVRToolkit related components
*/ */
...@@ -50,25 +49,38 @@ class RWTHVRTOOLKIT_API UVirtualRealityUtilities : public UBlueprintFunctionLibr ...@@ -50,25 +49,38 @@ class RWTHVRTOOLKIT_API UVirtualRealityUtilities : public UBlueprintFunctionLibr
GENERATED_BODY() GENERATED_BODY()
public: public:
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsDesktopMode(); UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsRoomMountedMode(); static bool IsDesktopMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsHeadMountedMode(); UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsCave(); static bool IsRoomMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsTdw(); UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsRolv(); static bool IsHeadMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
UFUNCTION(BlueprintPure, Category = "DisplayCluster") static bool IsMaster(); static bool IsCave();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") static bool IsSlave(); UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsTdw();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") static FString GetNodeName(); UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsRolv();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsMaster();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static bool IsSlave();
UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static FString GetNodeName();
/* Distance in meters */ /* Distance in meters */
UFUNCTION(BlueprintPure, Category = "DisplayCluster") static float GetEyeDistance(); UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static float GetEyeDistance();
UFUNCTION(BlueprintPure, Category = "DisplayCluster") static EEyeStereoOffset GetNodeEyeType(); UFUNCTION(BlueprintPure, Category = "DisplayCluster")
static EEyeStereoOffset GetNodeEyeType();
//Get Component of Display Cluster by it's name, which is specified in the nDisplay config //Get Component of Display Cluster by it's name, which is specified in the nDisplay config
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster") static USceneComponent* GetClusterComponent(const FString& Name); UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster")
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster") static USceneComponent* GetNamedClusterComponent(const ENamedClusterComponent& Component); static USceneComponent* GetClusterComponent(const FString& Name);
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster")
static USceneComponent* GetNamedClusterComponent(const ENamedClusterComponent& Component);
/* Load and create an Object from an asset path. This only works in the constructor */ /* Load and create an Object from an asset path. This only works in the constructor */
template <class T> template <class T>
...@@ -82,7 +94,6 @@ public: ...@@ -82,7 +94,6 @@ public:
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
static void ShowErrorAndQuit(UWorld* WorldContext, const FString& Message); static void ShowErrorAndQuit(UWorld* WorldContext, const FString& Message);
}; };
template <typename T> template <typename T>
......
...@@ -17,9 +17,9 @@ FGrabbingBehaviorOnLineVisualizer::~FGrabbingBehaviorOnLineVisualizer() ...@@ -17,9 +17,9 @@ FGrabbingBehaviorOnLineVisualizer::~FGrabbingBehaviorOnLineVisualizer()
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
void FGrabbingBehaviorOnLineVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) { void FGrabbingBehaviorOnLineVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View,
FPrimitiveDrawInterface* PDI)
{
const UGrabbingBehaviorOnLineComponent* LineBehavior = Cast<const UGrabbingBehaviorOnLineComponent>(Component); const UGrabbingBehaviorOnLineComponent* LineBehavior = Cast<const UGrabbingBehaviorOnLineComponent>(Component);
if (LineBehavior != nullptr) if (LineBehavior != nullptr)
...@@ -31,5 +31,3 @@ void FGrabbingBehaviorOnLineVisualizer::DrawVisualization(const UActorComponent* ...@@ -31,5 +31,3 @@ void FGrabbingBehaviorOnLineVisualizer::DrawVisualization(const UActorComponent*
PDI->DrawLine(Attachment + Forward * Distance, Attachment - Forward * Distance, FColor::Blue, SDPG_World); PDI->DrawLine(Attachment + Forward * Distance, Attachment - Forward * Distance, FColor::Blue, SDPG_World);
} }
} }
...@@ -13,9 +13,9 @@ FGrabbingBehaviorPlaneVisualizer::~FGrabbingBehaviorPlaneVisualizer() ...@@ -13,9 +13,9 @@ FGrabbingBehaviorPlaneVisualizer::~FGrabbingBehaviorPlaneVisualizer()
{ {
} }
void FGrabbingBehaviorPlaneVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) { void FGrabbingBehaviorPlaneVisualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View,
FPrimitiveDrawInterface* PDI)
{
const UGrabbingBehaviorOnPlaneComponent* PlaneBehavior = Cast<const UGrabbingBehaviorOnPlaneComponent>(Component); const UGrabbingBehaviorOnPlaneComponent* PlaneBehavior = Cast<const UGrabbingBehaviorOnPlaneComponent>(Component);
if (PlaneBehavior != nullptr) if (PlaneBehavior != nullptr)
...@@ -40,4 +40,3 @@ void FGrabbingBehaviorPlaneVisualizer::DrawVisualization(const UActorComponent* ...@@ -40,4 +40,3 @@ void FGrabbingBehaviorPlaneVisualizer::DrawVisualization(const UActorComponent*
} }
} }
} }
#include "RWTHVRToolkitEditor.h" #include "RWTHVRToolkitEditor.h"
#include "ComponentVisualizers.h"
#include "Interaction/GrabbingBehaviorOnLineVisualizer.h"
#include "Interaction/GrabbingBehaviorPlaneVisualizer.h"
#include "Interaction/GrabbingBehaviorOnPlaneComponent.h"
#include "Interaction/GrabbingBehaviorOnLineComponent.h"
#include "UnrealEdGlobals.h" #include "UnrealEdGlobals.h"
#include "Editor/UnrealEdEngine.h" #include "Editor/UnrealEdEngine.h"
#include "Interaction/GrabbingBehaviorOnLineComponent.h"
#include "Interaction/GrabbingBehaviorOnLineVisualizer.h"
#include "Interaction/GrabbingBehaviorOnPlaneComponent.h"
#include "Interaction/GrabbingBehaviorPlaneVisualizer.h"
IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor); IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor);
...@@ -16,21 +13,23 @@ IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor); ...@@ -16,21 +13,23 @@ IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor);
void FRWTHVRToolkitEditorModule::StartupModule() void FRWTHVRToolkitEditorModule::StartupModule()
{ {
if (GUnrealEd != NULL) if (GUnrealEd != nullptr)
{ {
TSharedPtr<FComponentVisualizer> LineVisualizer = MakeShareable(new FGrabbingBehaviorOnLineVisualizer()); const TSharedPtr<FComponentVisualizer> LineVisualizer = MakeShareable(new FGrabbingBehaviorOnLineVisualizer());
if (LineVisualizer.IsValid()) if (LineVisualizer.IsValid())
{ {
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName(), LineVisualizer); GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName(),
LineVisualizer);
LineVisualizer->OnRegister(); LineVisualizer->OnRegister();
} }
TSharedPtr<FComponentVisualizer> PlaneVisualizer = MakeShareable(new FGrabbingBehaviorPlaneVisualizer()); const TSharedPtr<FComponentVisualizer> PlaneVisualizer = MakeShareable(new FGrabbingBehaviorPlaneVisualizer());
if (PlaneVisualizer.IsValid()) if (PlaneVisualizer.IsValid())
{ {
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName(), PlaneVisualizer); GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName(),
PlaneVisualizer);
PlaneVisualizer->OnRegister(); PlaneVisualizer->OnRegister();
} }
} }
...@@ -38,7 +37,7 @@ void FRWTHVRToolkitEditorModule::StartupModule() ...@@ -38,7 +37,7 @@ void FRWTHVRToolkitEditorModule::StartupModule()
void FRWTHVRToolkitEditorModule::ShutdownModule() void FRWTHVRToolkitEditorModule::ShutdownModule()
{ {
if (GUnrealEd != NULL) if (GUnrealEd != nullptr)
{ {
GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName()); GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName());
GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName()); GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName());
......
...@@ -16,9 +16,6 @@ public: ...@@ -16,9 +16,6 @@ public:
FGrabbingBehaviorOnLineVisualizer(); FGrabbingBehaviorOnLineVisualizer();
~FGrabbingBehaviorOnLineVisualizer(); ~FGrabbingBehaviorOnLineVisualizer();
virtual void DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) override; virtual void DrawVisualization(const UActorComponent* Component, const FSceneView* View,
FPrimitiveDrawInterface* PDI) override;
}; };
...@@ -16,5 +16,6 @@ public: ...@@ -16,5 +16,6 @@ public:
FGrabbingBehaviorPlaneVisualizer(); FGrabbingBehaviorPlaneVisualizer();
~FGrabbingBehaviorPlaneVisualizer(); ~FGrabbingBehaviorPlaneVisualizer();
virtual void DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI) override; virtual void DrawVisualization(const UActorComponent* Component, const FSceneView* View,
FPrimitiveDrawInterface* PDI) override;
}; };
...@@ -11,5 +11,4 @@ public: ...@@ -11,5 +11,4 @@ public:
virtual void StartupModule() override; virtual void StartupModule() override;
virtual void ShutdownModule() override; virtual void ShutdownModule() override;
// End IModuleInterface implementation // End IModuleInterface implementation
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment