diff --git a/Content/Pawn/Cube_Blueprint.uasset b/Content/Pawn/Cube_Blueprint.uasset new file mode 100644 index 0000000000000000000000000000000000000000..b50f180a5c303691cef9503d337c862430838457 Binary files /dev/null and b/Content/Pawn/Cube_Blueprint.uasset differ diff --git a/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp b/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp index 9231f2a899ec4addf35cfa11fadd5d00aa9979cb..d3970f5cc6140ca51fac0d5836aedfeb9f24b10d 100644 --- a/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp +++ b/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp @@ -70,17 +70,17 @@ void UIntenSelectComponent::BeginPlay() { Super::BeginPlay(); - this->InitSplineComponent(); - this->InitSplineMeshComponent(); - this->InitForwardRayMeshComponent(); - this->InitDebugConeMeshComponent(); - this->InitInputBindings(); - this->InitMaterialParamCollection(); + InitSplineComponent(); + InitSplineMeshComponent(); + InitForwardRayMeshComponent(); + InitDebugConeMeshComponent(); + InitInputBindings(); + InitMaterialParamCollection(); - this->SphereCastRadius = CalculateSphereCastRadius(); - this->InteractionDistance = this->MaxSelectionDistance; + SphereCastRadius = CalculateSphereCastRadius(); + InteractionDistance = MaxSelectionDistance; - this->SetActive(SetActiveOnStart, false); + SetActive(SetActiveOnStart, false); } void UIntenSelectComponent::InitInputBindings() diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCircleScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCircleScoring.h index 28046b36670ec03e2f8333b7a46d8d4d50ff6c28..b1022932d1e0d9e503d59ab0bdccd392a99849b1 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCircleScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCircleScoring.h @@ -1,5 +1,3 @@ -// Fill out your copyright notice in the Description page of Project Settings. - #pragma once #include "CoreMinimal.h" diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCubeScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCubeScoring.h index 5646520a1557c8c957feb51e089f36e16f820abf..1556dab1295c8082f1d3600df03512960f49363b 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCubeScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCubeScoring.h @@ -21,9 +21,6 @@ protected: public: UIntenSelectableCubeScoring(); - UPROPERTY(EditAnywhere) - bool DrawDebug = true; - UPROPERTY(EditAnywhere) bool BackFaceCulling = false; diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCylinderScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCylinderScoring.h index d32e6a1ef1bc20489f1d2aa7046b2d2b101ec6b9..73fbeb615956ba93f747d6053dea6a23d2c85b2d 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCylinderScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableCylinderScoring.h @@ -21,9 +21,6 @@ protected: public: UIntenSelectableCylinderScoring(); - UPROPERTY(EditAnywhere) - bool DrawDebug = true; - virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin, const FVector& ConeForwardDirection, const float ConeBackwardShiftDistance, const float ConeAngle, diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableLineScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableLineScoring.h index fab919a87338f3bc4a17892f1024116cf320f9ec..2b1b5cf58cb99b50cf12380605bbca339e0b3720 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableLineScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableLineScoring.h @@ -21,9 +21,6 @@ protected: public: UIntenSelectableLineScoring(); - UPROPERTY(EditAnywhere) - bool DrawDebug = true; - virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin, const FVector& ConeForwardDirection, const float ConeBackwardShiftDistance, const float ConeAngle, diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableMultiPointScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableMultiPointScoring.h index fa2742e320b50dc7930be04efec380802f6c0e7c..ef5c5480004ef62e006fbafadfd8dfd37055d9c2 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableMultiPointScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableMultiPointScoring.h @@ -1,5 +1,3 @@ -// Fill out your copyright notice in the Description page of Project Settings. - #pragma once #include "CoreMinimal.h" diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableRectangleScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableRectangleScoring.h index 12eceb0e803def69c1672f676b50c0aa14d88014..3df3eeec9b373547e324b1558e063b7ab5dd5a42 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableRectangleScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableRectangleScoring.h @@ -21,9 +21,6 @@ protected: public: UIntenSelectableRectangleScoring(); - UPROPERTY(EditAnywhere) - bool DrawDebug = true; - UPROPERTY(EditAnywhere) bool OnlyOutline = false; diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableScoring.h index 542c8c97ca7dbf0583a558ac32cc6311d8b860b4..445c8a4f24bea1a83d9c48e0b48263cc1dd32678 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableScoring.h @@ -17,6 +17,9 @@ protected: public: UIntenSelectableScoring(); + UPROPERTY(EditAnywhere) + bool DrawDebug = true; + UPROPERTY(BlueprintReadOnly) float CurrentScore = 0; diff --git a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableSphereScoring.h b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableSphereScoring.h index 42100b8d9857b49a5e21bb8062ed99602f532cc7..6d0835a432366e189d0a080aa3254cd613e5ed48 100644 --- a/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableSphereScoring.h +++ b/Source/RWTHVRToolkit/Public/Interaction/Interactables/IntenSelect/IntenSelectableSphereScoring.h @@ -24,9 +24,6 @@ public: UPROPERTY(EditAnywhere) float Radius = 50; - UPROPERTY(EditAnywhere) - bool DrawDebug = true; - virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin, const FVector& ConeForwardDirection, const float ConeBackwardShiftDistance, const float ConeAngle, diff --git a/Source/RWTHVRToolkit/Public/Pawn/IntenSelectComponent.h b/Source/RWTHVRToolkit/Public/Pawn/IntenSelectComponent.h index ebb11aae55a37e1cd0974a0578c0ea3c712a3715..864e5deeac2662864d67de4a6313bbeb7f472560 100644 --- a/Source/RWTHVRToolkit/Public/Pawn/IntenSelectComponent.h +++ b/Source/RWTHVRToolkit/Public/Pawn/IntenSelectComponent.h @@ -29,35 +29,47 @@ private: bool IsGrabbing; bool IsWidgetInFocus; FVector WidgetFocusPoint; + FVector LastKnownGrabPoint; UPROPERTY() UWidgetComponent* LastFocusedWidget; + UPROPERTY() TMap<UIntenSelectable*, float> ScoreMap; + UPROPERTY() TMap<UIntenSelectable*, FHitResult> ContactPointMap; + UPROPERTY() UIntenSelectable* CurrentSelection; + UPROPERTY() UIntenSelectable* LastKnownSelection; - UPROPERTY() - FVector LastKnownGrabPoint; + UPROPERTY() UStaticMeshComponent* DebugConeMeshComponent; + UPROPERTY() UStaticMeshComponent* ForwardRayMeshComponent; + UPROPERTY() USplineComponent* SplineComponent; + UPROPERTY() USplineMeshComponent* SplineMeshComponent; + UPROPERTY() UMaterialParameterCollectionInstance* ParameterCollectionInstance; + UPROPERTY() UStaticMesh* DebugConeMesh; + UPROPERTY() UMaterialInterface* DebugConeMaterial; + UPROPERTY() UStaticMesh* ForwardRayMesh; + #pragma endregion #pragma region /** SETTINGS */