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
if (FApp::GetBuildTargetType() == EBuildTargetType::Editor) return;
// 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);
Config.LoadFile(ConfigFile);
......
......@@ -7,7 +7,6 @@
#include "VirtualRealityUtilities.generated.h"
/**
* Custom log category for all RWTHVRToolkit related components
*/
......@@ -50,25 +49,38 @@ class RWTHVRTOOLKIT_API UVirtualRealityUtilities : public UBlueprintFunctionLibr
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsDesktopMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsRoomMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsHeadMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsCave();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform") static bool IsTdw();
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();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsDesktopMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsRoomMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsHeadMountedMode();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsCave();
UFUNCTION(BlueprintPure, Category = "DisplayCluster|Platform")
static bool IsTdw();
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 */
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
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster") static USceneComponent* GetClusterComponent(const FString& Name);
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster") static USceneComponent* GetNamedClusterComponent(const ENamedClusterComponent& Component);
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "DisplayCluster")
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 */
template <class T>
......@@ -82,7 +94,6 @@ public:
UFUNCTION(BlueprintCallable)
static void ShowErrorAndQuit(UWorld* WorldContext, const FString& Message);
};
template <typename T>
......
......@@ -17,9 +17,9 @@ FGrabbingBehaviorOnLineVisualizer::~FGrabbingBehaviorOnLineVisualizer()
// 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);
if (LineBehavior != nullptr)
......@@ -31,5 +31,3 @@ void FGrabbingBehaviorOnLineVisualizer::DrawVisualization(const UActorComponent*
PDI->DrawLine(Attachment + Forward * Distance, Attachment - Forward * Distance, FColor::Blue, SDPG_World);
}
}
......@@ -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);
if (PlaneBehavior != nullptr)
......@@ -40,4 +40,3 @@ void FGrabbingBehaviorPlaneVisualizer::DrawVisualization(const UActorComponent*
}
}
}
#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 "Editor/UnrealEdEngine.h"
#include "Interaction/GrabbingBehaviorOnLineComponent.h"
#include "Interaction/GrabbingBehaviorOnLineVisualizer.h"
#include "Interaction/GrabbingBehaviorOnPlaneComponent.h"
#include "Interaction/GrabbingBehaviorPlaneVisualizer.h"
IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor);
......@@ -16,21 +13,23 @@ IMPLEMENT_GAME_MODULE(FRWTHVRToolkitEditorModule, RWTHVRToolkitEditor);
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())
{
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName(), LineVisualizer);
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName(),
LineVisualizer);
LineVisualizer->OnRegister();
}
TSharedPtr<FComponentVisualizer> PlaneVisualizer = MakeShareable(new FGrabbingBehaviorPlaneVisualizer());
const TSharedPtr<FComponentVisualizer> PlaneVisualizer = MakeShareable(new FGrabbingBehaviorPlaneVisualizer());
if (PlaneVisualizer.IsValid())
{
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName(), PlaneVisualizer);
GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName(),
PlaneVisualizer);
PlaneVisualizer->OnRegister();
}
}
......@@ -38,7 +37,7 @@ void FRWTHVRToolkitEditorModule::StartupModule()
void FRWTHVRToolkitEditorModule::ShutdownModule()
{
if (GUnrealEd != NULL)
if (GUnrealEd != nullptr)
{
GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName());
GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName());
......
......@@ -16,9 +16,6 @@ public:
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:
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:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
// End IModuleInterface implementation
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment