Skip to content
Snippets Groups Projects
Select Git revision
  • 48e863193c805ee80e8486634b6f06ef2d5d9e19
  • master default protected
  • develop protected
  • feature/lfp
  • feature/add-documentation
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.0
9 results

nest_controller.py

Blame
  • VAReceiverActor.cpp 12.85 KiB
    // Fill out your copyright notice in the Description page of Project Settings.
    // what's up?
    
    #include "VAReceiverActor.h"
    
    #include "VAPlugin.h"
    #include "VAUtils.h"
    #include "VADefines.h"
    
    #include "SoundSource/VAAbstractSourceComponent.h"
    #include "ImageSourceModel/VAReflectionWall.h"
    #include "Directivity/VADirectivityManager.h"
    #include "HRIR/VAHRIRManager.h"
    
    
    #include "Cluster/DisplayClusterClusterEvent.h"
    #include "Engine/World.h"							// World
    #include "GameFramework/PlayerController.h"			// Viewport
    #include "IDisplayCluster.h"						// For Events
    #include "Pawn/VirtualRealityPawn.h"						// VR Pawn
    #include "Kismet/GameplayStatics.h"					// Get Actors of class
    #include "Utility/VirtualRealityUtilities.h"
    
    
    // ****************************************************************** // 
    // ******* Initialization Functions ********************************* //
    // ****************************************************************** //
    
    AVAReceiverActor::AVAReceiverActor()
    {
    	PrimaryActorTick.bCanEverTick = true;
    
      DirManager = MakeShared<FVADirectivityManager>();
      HRIRManager = MakeShared<FVAHRIRManager>();
    
      AuralizationModeController = CreateDefaultSubobject<UVAAuralizationModeController>(TEXT("AuralizationModeController"));
    }
    
    void AVAReceiverActor::BeginPlay()
    {
    	Super::BeginPlay();
    
    	FVAPlugin::SetReceiverActor(this);
    
    	// Cluster Stuff for Events //
    	RunOnAllNodesEvent.Attach(this);
    
    	// CurrentReceiverActor = this;
    	if(bReconnecToVAServer && UVirtualRealityUtilities::IsMaster() && FVAPlugin::IsConnected())
    	{
    		//this might be needed if different server version should be started between levels
    		FVAPlugin::DisconnectServer();
    	}
    
    	//try to start (remote) VAServer automatically
    	bool bStartedVAServer = false;
    	if (bAutomaticRemoteVAStart)
    	{
    		FVAPlugin::VAServerLauncher.StartVAServerLauncher(); //if possible
    		bStartedVAServer = FVAPlugin::VAServerLauncher.RemoteStartVAServer(GetIPAddress(), RemoteVAStarterPort, WhichVAServerVersionToStart);
    		if(bStartedVAServer){
    			FVAPlugin::SetUseVA(true);
    		}
    	}
    	
    	// Ask if used or not
    	FVAPlugin::AskForSettings(GetIPAddress(), GetPort(), bAskForDebugMode, !bStartedVAServer);
    
    	if (UVirtualRealityUtilities::IsMaster())
    	{