Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RWTH VR Toolkit
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
RWTH VR Toolkit
Commits
267b7ba8
Commit
267b7ba8
authored
5 years ago
by
Ali Can Demiralp
Browse files
Options
Downloads
Patches
Plain Diff
Restructuring progress.
parent
987a48ad
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/DisplayClusterExtensions/Private/VirtualRealityPawn.cpp
+29
-19
29 additions, 19 deletions
...e/DisplayClusterExtensions/Private/VirtualRealityPawn.cpp
Source/DisplayClusterExtensions/Public/VirtualRealityPawn.h
+3
-0
3 additions, 0 deletions
Source/DisplayClusterExtensions/Public/VirtualRealityPawn.h
with
32 additions
and
19 deletions
Source/DisplayClusterExtensions/Private/VirtualRealityPawn.cpp
+
29
−
19
View file @
267b7ba8
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include
"Kismet/GameplayStatics.h"
#include
"Kismet/GameplayStatics.h"
#include
"DisplayClusterSettings.h"
#include
"DisplayClusterSettings.h"
#include
"HeadMountedDisplayFunctionLibrary.h"
#include
"HeadMountedDisplayFunctionLibrary.h"
#include
"IDisplayClusterConfigManager.h"
#include
"IDisplayCluster.h"
#include
"IDisplayCluster.h"
#include
"IXRTrackingSystem.h"
#include
"IXRTrackingSystem.h"
...
@@ -98,6 +99,14 @@ bool AVirtualRealityPawn::IsHeadMountedMode
...
@@ -98,6 +99,14 @@ bool AVirtualRealityPawn::IsHeadMountedMode
return
GEngine
->
XRSystem
.
IsValid
()
&&
GEngine
->
XRSystem
->
IsHeadTrackingAllowed
();
return
GEngine
->
XRSystem
.
IsValid
()
&&
GEngine
->
XRSystem
->
IsHeadTrackingAllowed
();
}
}
FString
AVirtualRealityPawn
::
GetNodeName
()
{
return
IsRoomMountedMode
()
?
IDisplayCluster
::
Get
().
GetClusterMgr
()
->
GetNodeId
()
:
FString
(
TEXT
(
"Localhost"
));
}
float
AVirtualRealityPawn
::
GetEyeDistance
()
{
return
IDisplayCluster
::
Get
().
GetConfigMgr
()
->
GetConfigStereo
().
EyeDist
;
}
float
AVirtualRealityPawn
::
GetBaseTurnRate
()
const
float
AVirtualRealityPawn
::
GetBaseTurnRate
()
const
{
{
...
@@ -176,7 +185,7 @@ void AVirtualRealityPawn::BeginPlay
...
@@ -176,7 +185,7 @@ void AVirtualRealityPawn::BeginPlay
LeftHand
=
Flystick
;
LeftHand
=
Flystick
;
RightHand
=
Flystick
;
RightHand
=
Flystick
;
// TODO
RootComponent
->
SetWorldLocation
(
FVector
(
0
,
2
,
0
),
false
,
nullptr
,
ETeleportType
::
None
);
}
}
else
if
(
IsHeadMountedMode
())
else
if
(
IsHeadMountedMode
())
{
{
...
@@ -228,19 +237,20 @@ void AVirtualRealityPawn::SetupPlayerInputComponent
...
@@ -228,19 +237,20 @@ void AVirtualRealityPawn::SetupPlayerInputComponent
PlayerInputComponent
->
BindAxis
(
"TurnRate"
,
this
,
&
AVirtualRealityPawn
::
OnTurnRate
);
PlayerInputComponent
->
BindAxis
(
"TurnRate"
,
this
,
&
AVirtualRealityPawn
::
OnTurnRate
);
PlayerInputComponent
->
BindAxis
(
"LookUpRate"
,
this
,
&
AVirtualRealityPawn
::
OnLookUpRate
);
PlayerInputComponent
->
BindAxis
(
"LookUpRate"
,
this
,
&
AVirtualRealityPawn
::
OnLookUpRate
);
PlayerInputComponent
->
BindAction
<
FFireDelegate
>
(
"Fire"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnFire
,
true
);
// The button names are based on the definitions in aixcave_422.cfg.
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action1"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
1
);
PlayerInputComponent
->
BindAction
<
FFireDelegate
>
(
"nDisplayButton0"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnFire
,
true
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action2"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
2
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton1"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
1
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action3"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
3
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton2"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
2
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action4"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
4
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton3"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
3
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action5"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
5
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton4"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
4
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton5"
,
IE_Pressed
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
true
,
5
);
PlayerInputComponent
->
BindAction
<
FFireDelegate
>
(
"Fire"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnFire
,
false
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action1"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
1
);
PlayerInputComponent
->
BindAction
<
FFireDelegate
>
(
"nDisplayButton0"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnFire
,
false
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action2"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
2
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton1"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
1
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action3"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
3
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton2"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
2
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action4"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
4
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton3"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
3
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"Action5"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
5
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton4"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
4
);
PlayerInputComponent
->
BindAction
<
FActionDelegate
>
(
"nDisplayButton5"
,
IE_Released
,
this
,
&
AVirtualRealityPawn
::
OnAction
,
false
,
5
);
}
}
}
}
UPawnMovementComponent
*
AVirtualRealityPawn
::
GetMovementComponent
()
const
UPawnMovementComponent
*
AVirtualRealityPawn
::
GetMovementComponent
()
const
...
...
This diff is collapsed.
Click to expand it.
Source/DisplayClusterExtensions/Public/VirtualRealityPawn.h
+
3
−
0
View file @
267b7ba8
...
@@ -33,6 +33,9 @@ public:
...
@@ -33,6 +33,9 @@ public:
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
bool
IsRoomMountedMode
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
bool
IsRoomMountedMode
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
bool
IsHeadMountedMode
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
bool
IsHeadMountedMode
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
FString
GetNodeName
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
float
GetEyeDistance
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
float
GetBaseTurnRate
()
const
;
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
float
GetBaseTurnRate
()
const
;
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
UFloatingPawnMovement
*
GetFloatingPawnMovement
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
UFloatingPawnMovement
*
GetFloatingPawnMovement
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
URotatingMovementComponent
*
GetRotatingMovementComponent
();
UFUNCTION
(
BlueprintCallable
,
Category
=
"Pawn"
)
URotatingMovementComponent
*
GetRotatingMovementComponent
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment