A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UAISense_Sight_VR Class Reference

UCLASS(ClassGroup = AI, config = Game) More...

#include <VRAIPerceptionOverrides.h>

Inheritance diagram for UAISense_Sight_VR:
[legend]

Classes

struct  FDigestedSightProperties
 

Public Types

enum  FQueriesOperationPostProcess { DontSort , Sort }
 
typedef TMap< FAISightTargetVR::FTargetId, FAISightTargetVRFTargetsContainer
 

Public Member Functions

virtual void OnListenerForgetsActor (const FPerceptionListener &Listener, AActor &ActorToForget) override
 
virtual void OnListenerForgetsAll (const FPerceptionListener &Listener) override
 
virtual void PostInitProperties () override
 
void RegisterEvent (const FAISightEventVR &Event)
 
virtual void RegisterSource (AActor &SourceActors) override
 
bool RegisterTarget (AActor &TargetActor, FQueriesOperationPostProcess PostProcess)
 
bool RegisterTarget (AActor &TargetActor, FQueriesOperationPostProcess PostProcess, TFunctionRef< void(FAISightQueryVR &)> OnAddedFunc)
 
void RemoveAllQueriesByListener (const FPerceptionListener &Listener, FQueriesOperationPostProcess PostProcess)
 
void RemoveAllQueriesByListener (const FPerceptionListener &Listener, FQueriesOperationPostProcess PostProcess, TFunctionRef< void(const FAISightQueryVR &)> OnRemoveFunc)
 
void RemoveAllQueriesToTarget (const FAISightTargetVR::FTargetId &TargetId, FQueriesOperationPostProcess PostProcess)
 
void RemoveAllQueriesToTarget (const FAISightTargetVR::FTargetId &TargetId, FQueriesOperationPostProcess PostProcess, TFunctionRef< void(const FAISightQueryVR &)> OnRemoveFunc)
 
FORCEINLINE void SortQueries ()
 
virtual void UnregisterSource (AActor &SourceActor) override
 

Public Attributes

bool bSightQueriesOutOfRangeDirty = true
 
TMap< FPerceptionListenerID, FDigestedSightPropertiesDigestedProperties
 
int32 NextOutOfRangeIndex = 0
 
FTargetsContainer ObservedTargets
 
TArray< FAISightQueryVRSightQueriesInRange
 
TArray< FAISightQueryVRSightQueriesOutOfRange
 

Protected Member Functions

float CalcQueryImportance (const FPerceptionListener &Listener, const FVector &TargetLocation, const float SightRadiusSq) const
 
void GenerateQueriesForListener (const FPerceptionListener &Listener, const FDigestedSightProperties &PropertyDigest, const TFunction< void(FAISightQueryVR &)> &OnAddedFunc=nullptr)
 
virtual void OnListenerConfigUpdated (const FPerceptionListener &UpdatedListener) override
 
void OnListenerRemovedImpl (const FPerceptionListener &RemovedListener)
 
void OnListenerUpdateImpl (const FPerceptionListener &UpdatedListener)
 
void OnNewListenerImpl (const FPerceptionListener &NewListener)
 
bool RegisterTarget (AActor &TargetActor, const TFunction< void(FAISightQueryVR &)> &OnAddedFunc=nullptr)
 
void RemoveAllQueriesByListener (const FPerceptionListener &Listener, const TFunction< void(const FAISightQueryVR &)> &OnRemoveFunc=nullptr)
 
void RemoveAllQueriesToTarget (const FAISightTargetVR::FTargetId &TargetId, const TFunction< void(const FAISightQueryVR &)> &OnRemoveFunc=nullptr)
 
virtual bool ShouldAutomaticallySeeTarget (const FDigestedSightProperties &PropDigest, FAISightQueryVR *SightQuery, FPerceptionListener &Listener, AActor *TargetActor, float &OutStimulusStrength) const
 
virtual float Update () override
 

Protected Attributes

ECollisionChannel DefaultSightCollisionChannel
 
float HighImportanceDistanceSquare
 
float HighImportanceQueryDistanceThreshold
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 
float MaxQueryImportance
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 
double MaxTimeSlicePerTick
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 
int32 MaxTracesPerTick
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 
int32 MinQueriesPerTimeSliceCheck
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 
float SightLimitQueryImportance
 UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)
 

Private Member Functions

 GENERATED_UCLASS_BODY ()
 

Detailed Description

UCLASS(ClassGroup = AI, config = Game)

Definition at line 217 of file VRAIPerceptionOverrides.h.

Member Typedef Documentation

◆ FTargetsContainer

Member Enumeration Documentation

◆ FQueriesOperationPostProcess

Enumerator
DontSort 
Sort 

Definition at line 331 of file VRAIPerceptionOverrides.h.

Member Function Documentation

◆ CalcQueryImportance()

FORCEINLINE_DEBUGGABLE float UAISense_Sight_VR::CalcQueryImportance ( const FPerceptionListener & Listener,
const FVector & TargetLocation,
const float SightRadiusSq ) const
protected

Definition at line 160 of file VRAIPerceptionOverrides.cpp.

Here is the caller graph for this function:

◆ GENERATED_UCLASS_BODY()

UAISense_Sight_VR::GENERATED_UCLASS_BODY ( )
private

◆ GenerateQueriesForListener()

void UAISense_Sight_VR::GenerateQueriesForListener ( const FPerceptionListener & Listener,
const FDigestedSightProperties & PropertyDigest,
const TFunction< void(FAISightQueryVR &)> & OnAddedFunc = nullptr )
protected

Definition at line 656 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnListenerConfigUpdated()

void UAISense_Sight_VR::OnListenerConfigUpdated ( const FPerceptionListener & UpdatedListener)
overrideprotectedvirtual

Definition at line 770 of file VRAIPerceptionOverrides.cpp.

◆ OnListenerForgetsActor()

void UAISense_Sight_VR::OnListenerForgetsActor ( const FPerceptionListener & Listener,
AActor & ActorToForget )
overridevirtual

Definition at line 876 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ OnListenerForgetsAll()

void UAISense_Sight_VR::OnListenerForgetsAll ( const FPerceptionListener & Listener)
overridevirtual

Definition at line 898 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ OnListenerRemovedImpl()

void UAISense_Sight_VR::OnListenerRemovedImpl ( const FPerceptionListener & RemovedListener)
protected

Definition at line 793 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ OnListenerUpdateImpl()

void UAISense_Sight_VR::OnListenerUpdateImpl ( const FPerceptionListener & UpdatedListener)
protected

Definition at line 702 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ OnNewListenerImpl()

void UAISense_Sight_VR::OnNewListenerImpl ( const FPerceptionListener & NewListener)
protected

Definition at line 643 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ PostInitProperties()

void UAISense_Sight_VR::PostInitProperties ( )
overridevirtual

Definition at line 167 of file VRAIPerceptionOverrides.cpp.

◆ RegisterEvent()

void UAISense_Sight_VR::RegisterEvent ( const FAISightEventVR & Event)

Definition at line 515 of file VRAIPerceptionOverrides.cpp.

◆ RegisterSource()

void UAISense_Sight_VR::RegisterSource ( AActor & SourceActors)
overridevirtual

Definition at line 520 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ RegisterTarget() [1/3]

bool UAISense_Sight_VR::RegisterTarget ( AActor & TargetActor,
const TFunction< void(FAISightQueryVR &)> & OnAddedFunc = nullptr )
protected

returns information whether new LoS queries have been added

Definition at line 569 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterTarget() [2/3]

bool UAISense_Sight_VR::RegisterTarget ( AActor & TargetActor,
FQueriesOperationPostProcess PostProcess )
inline

Definition at line 347 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterTarget() [3/3]

bool UAISense_Sight_VR::RegisterTarget ( AActor & TargetActor,
FQueriesOperationPostProcess PostProcess,
TFunctionRef< void(FAISightQueryVR &)> OnAddedFunc )
inline

Definition at line 349 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesByListener() [1/3]

void UAISense_Sight_VR::RemoveAllQueriesByListener ( const FPerceptionListener & Listener,
const TFunction< void(const FAISightQueryVR &)> & OnRemoveFunc = nullptr )
protected

Definition at line 806 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesByListener() [2/3]

void UAISense_Sight_VR::RemoveAllQueriesByListener ( const FPerceptionListener & Listener,
FQueriesOperationPostProcess PostProcess )
inline

Definition at line 337 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesByListener() [3/3]

void UAISense_Sight_VR::RemoveAllQueriesByListener ( const FPerceptionListener & Listener,
FQueriesOperationPostProcess PostProcess,
TFunctionRef< void(const FAISightQueryVR &)> OnRemoveFunc )
inline

Definition at line 339 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesToTarget() [1/3]

void UAISense_Sight_VR::RemoveAllQueriesToTarget ( const FAISightTargetVR::FTargetId & TargetId,
const TFunction< void(const FAISightQueryVR &)> & OnRemoveFunc = nullptr )
protected

Definition at line 846 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesToTarget() [2/3]

void UAISense_Sight_VR::RemoveAllQueriesToTarget ( const FAISightTargetVR::FTargetId & TargetId,
FQueriesOperationPostProcess PostProcess )
inline

Definition at line 341 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllQueriesToTarget() [3/3]

void UAISense_Sight_VR::RemoveAllQueriesToTarget ( const FAISightTargetVR::FTargetId & TargetId,
FQueriesOperationPostProcess PostProcess,
TFunctionRef< void(const FAISightQueryVR &)> OnRemoveFunc )
inline

Definition at line 343 of file VRAIPerceptionOverrides.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldAutomaticallySeeTarget()

bool UAISense_Sight_VR::ShouldAutomaticallySeeTarget ( const FDigestedSightProperties & PropDigest,
FAISightQueryVR * SightQuery,
FPerceptionListener & Listener,
AActor * TargetActor,
float & OutStimulusStrength ) const
protectedvirtual

Definition at line 194 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SortQueries()

FORCEINLINE void UAISense_Sight_VR::SortQueries ( )
inline

Definition at line 329 of file VRAIPerceptionOverrides.h.

◆ UnregisterSource()

void UAISense_Sight_VR::UnregisterSource ( AActor & SourceActor)
overridevirtual

Definition at line 525 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

◆ Update()

float UAISense_Sight_VR::Update ( )
overrideprotectedvirtual

Definition at line 209 of file VRAIPerceptionOverrides.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ bSightQueriesOutOfRangeDirty

bool UAISense_Sight_VR::bSightQueriesOutOfRangeDirty = true

Definition at line 242 of file VRAIPerceptionOverrides.h.

◆ DefaultSightCollisionChannel

ECollisionChannel UAISense_Sight_VR::DefaultSightCollisionChannel
protected

Definition at line 291 of file VRAIPerceptionOverrides.h.

◆ DigestedProperties

TMap<FPerceptionListenerID, FDigestedSightProperties> UAISense_Sight_VR::DigestedProperties

Definition at line 236 of file VRAIPerceptionOverrides.h.

◆ HighImportanceDistanceSquare

float UAISense_Sight_VR::HighImportanceDistanceSquare
protected

Definition at line 275 of file VRAIPerceptionOverrides.h.

◆ HighImportanceQueryDistanceThreshold

float UAISense_Sight_VR::HighImportanceQueryDistanceThreshold
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 273 of file VRAIPerceptionOverrides.h.

◆ MaxQueryImportance

float UAISense_Sight_VR::MaxQueryImportance
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 282 of file VRAIPerceptionOverrides.h.

◆ MaxTimeSlicePerTick

double UAISense_Sight_VR::MaxTimeSlicePerTick
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 266 of file VRAIPerceptionOverrides.h.

◆ MaxTracesPerTick

int32 UAISense_Sight_VR::MaxTracesPerTick
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 252 of file VRAIPerceptionOverrides.h.

◆ MinQueriesPerTimeSliceCheck

int32 UAISense_Sight_VR::MinQueriesPerTimeSliceCheck
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 259 of file VRAIPerceptionOverrides.h.

◆ NextOutOfRangeIndex

int32 UAISense_Sight_VR::NextOutOfRangeIndex = 0

The SightQueries are a n^2 problem and to reduce the sort time, they are now split between in range and out of range Since the out of range queries only age as the distance component of the score is always 0, there is few need to sort them In the majority of the cases most of the queries are out of range, so the sort time is greatly reduced as we only sort the in range queries

Definition at line 241 of file VRAIPerceptionOverrides.h.

◆ ObservedTargets

FTargetsContainer UAISense_Sight_VR::ObservedTargets

Definition at line 235 of file VRAIPerceptionOverrides.h.

◆ SightLimitQueryImportance

float UAISense_Sight_VR::SightLimitQueryImportance
protectedEditDefaultsOnlyconfig

UPROPERTY(EditDefaultsOnly, Category = "AI Perception", config)

Definition at line 289 of file VRAIPerceptionOverrides.h.

◆ SightQueriesInRange

TArray<FAISightQueryVR> UAISense_Sight_VR::SightQueriesInRange

Definition at line 244 of file VRAIPerceptionOverrides.h.

◆ SightQueriesOutOfRange

TArray<FAISightQueryVR> UAISense_Sight_VR::SightQueriesOutOfRange

Definition at line 243 of file VRAIPerceptionOverrides.h.


The documentation for this class was generated from the following files: