Added Tobii from 4.23 + updated

This commit is contained in:
2023-03-04 04:19:09 +11:00
parent 2d5b9008e5
commit 1cde391516
521 changed files with 11735 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
/******************************************************************************
* Copyright 2017- Tobii Technology AB. All rights reserved.
*
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
******************************************************************************/
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "TobiiAimAtGazeComponent.generated.h"
UCLASS(BlueprintType, Blueprintable, meta = (BlueprintSpawnableComponent))
class TOBIIINTERACTIONS_API UTobiiAimAtGazeComponent : public UActorComponent
{
GENERATED_BODY()
public:
UTobiiAimAtGazeComponent();
public:
//This controls how the filters in FocusFilterList are used. If this is true, only focusables with a layer that is in the FocusFilterList will be considered. If this is false, the FocusFilterList will act like a black list, excluding any focusables whos layer can be found in the array.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gaze Focus Management")
bool bIsWhiteList;
//These are the filters that will determine what focus data you will receive. The behavior of the filters are controlled by bIsWhiteList.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gaze Focus Management")
TArray<FName> FocusLayerFilters;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Aim@gaze")
bool bAllowRetarget;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Aim@gaze")
float AimSpeed;
public:
//Use this to test if the user has turned aim@gaze on and it is available.
UFUNCTION(BlueprintPure, Category = "Aim@gaze")
bool AimAtGazeAvailable();
//Trigger an aim@gaze
UFUNCTION(BlueprintCallable, Category = "Aim@gaze")
void AimAtGaze();
//Call this every frame you want to continually track the aim@gaze target
UFUNCTION(BlueprintCallable, Category = "Aim@gaze")
void ContinuousAimAtGaze();
/************************************************************************/
/* UActorComponent */
/************************************************************************/
public:
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
private:
TWeakObjectPtr<class UPrimitiveComponent> CurrentFocusComponent;
FVector CurrentAimTarget;
bool bIsGazeAiming;
};

View File

@@ -0,0 +1,68 @@
/******************************************************************************
* Copyright 2017- Tobii Technology AB. All rights reserved.
*
* @author Temaran | Fredrik Lindh | fredrik.lindh@tobii.com | https://github.com/Temaran
******************************************************************************/
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "TobiiFireAtGazeComponent.generated.h"
UENUM(BlueprintType)
enum class ETobiiFireAtGazeNoTargetBehavior : uint8
{
PointGunForward,
PointGunToGaze
};
UCLASS(BlueprintType, Blueprintable, meta = (BlueprintSpawnableComponent))
class TOBIIINTERACTIONS_API UTobiiFireAtGazeComponent : public UActorComponent
{
GENERATED_BODY()
public:
UTobiiFireAtGazeComponent();
public:
//This controls how the filters in FocusFilterList are used. If this is true, only focusables with a layer that is in the FocusFilterList will be considered. If this is false, the FocusFilterList will act like a black list, excluding any focusables whos layer can be found in the array.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gaze Focus Management")
bool bIsWhiteList;
//These are the filters that will determine what focus data you will receive. The behavior of the filters are controlled by bIsWhiteList.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gaze Focus Management")
TArray<FName> FocusLayerFilters;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fire@gaze")
class UCameraComponent* CameraComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Fire@gaze")
TWeakObjectPtr<AActor> FireAtGazeTargetActor;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Fire@gaze")
TWeakObjectPtr<UPrimitiveComponent> FireAtGazeTargetComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Fire@gaze")
FVector FireAtGazeTargetLocation;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fire@gaze Settings")
float MaxDistance;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fire@gaze Settings")
ETobiiFireAtGazeNoTargetBehavior NoTargetBehavior;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fire@gaze Settings")
TEnumAsByte<ECollisionChannel> TraceChannel;
public:
//Use this to test if the user has turned fire@gaze on and it is available.
UFUNCTION(BlueprintPure, Category = "Fire@gaze")
bool FireAtGazeAvailable();
UFUNCTION(BlueprintPure, Category = "Fire@gaze")
bool WantsCrosshair();
/************************************************************************/
/* UActorComponent */
/************************************************************************/
public:
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
};