A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UVRGestureComponent Class ReferenceBlueprintable

UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = (VRExpansionPlugin)) More...

#include <VRGestureComponent.h>

Inheritance diagram for UVRGestureComponent:
[legend]

Public Member Functions

 UVRGestureComponent (const FObjectInitializer &ObjectInitializer)
 
void BeginDestroy () override
 
void BeginRecording (bool bRunDetection, bool bFlattenGesture=true, bool bDrawGesture=true, bool bDrawAsSpline=false, int SamplingHTZ=30, int SampleBufferSize=60, float ClampingTolerance=0.01f)
 UFUNCTION(BlueprintCallable, Category = "VRGestures")
 
void CaptureGestureFrame ()
 
void ClearRecording ()
 UFUNCTION(BlueprintCallable, Category = "VRGestures")
 
void DrawDebugGesture (UObject *WorldContextObject, UPARAM(ref) FTransform &StartTransform, FVRGesture GestureToDraw, FColor const &Color, bool bPersistentLines=false, uint8 DepthPriority=0, float LifeTime=-1.f, float Thickness=0.f)
 UFUNCTION(BlueprintCallable, Category = "VRGestures", meta = (WorldContext = "WorldContextObject"))
 
float dtw (FVRGesture seq1, FVRGesture seq2, bool bMirrorGesture=false, float Scaler=1.f)
 
FVRGesture EndRecording ()
 UFUNCTION(BlueprintCallable, Category = "VRGestures")
 
float GetGestureDistance (FVector Seq1, FVector Seq2, bool bMirrorGesture=false)
 
void OnGestureDetected (uint8 GestureType, FString &DetectedGestureName, int &DetectedGestureIndex, UGesturesDatabase *GestureDatabase)
 UFUNCTION(BlueprintImplementableEvent, Category = "BaseVRCharacter")
 
void RecalculateGestureSize (UPARAM(ref) FVRGesture &InputGesture, UGesturesDatabase *GestureDB)
 UFUNCTION(BlueprintCallable, Category = "VRGestures")
 
void RecognizeGesture (FVRGesture inputGesture)
 
void SaveRecording (UPARAM(ref) FVRGesture &Recording, FString RecordingName, bool bScaleRecordingToDatabase=true)
 UFUNCTION(BlueprintCallable, Category = "VRGestures")
 
void TickGesture ()
 

Public Attributes

bool bDrawRecordingGesture
 
bool bDrawRecordingGestureAsSpline
 
bool bDrawSplinesCurved
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
bool bGestureChanged
 
bool bGetGestureInWorldSpace
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
bool bRecordingFlattenGesture
 
EVRGestureState CurrentState
 UPROPERTY(BlueprintReadOnly, Category = "VRGestures")
 
FVRGesture GestureLog
 UPROPERTY(BlueprintReadOnly, Category = "VRGestures")
 
UGesturesDatabaseGesturesDB
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
int maxSlope
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
EVRGestureMirrorMode MirroringHand
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
FVRGestureDetectedSignature OnGestureDetected_Bind
 UPROPERTY(BlueprintAssignable, Category = "VRGestures")
 
FTransform OriginatingTransform
 
int RecordingBufferSize
 
float RecordingClampingTolerance
 
float RecordingDelta
 
FVRGestureSplineDraw RecordingGestureDraw
 
float SameSampleTolerance
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
UMaterialInterface * SplineMaterial
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
UStaticMesh * SplineMesh
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
FVector2D SplineMeshScaler
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
FVector StartVector
 
AVRBaseCharacterTargetCharacter
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")
 
FTimerHandle TickGestureTimer_Handle
 

Private Member Functions

 GENERATED_BODY ()
 

Detailed Description

UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = (VRExpansionPlugin))

A scene component that can sample its positions to record / track VR gestures Core code is from https://social.msdn.microsoft.com/Forums/en-US/4a428391-82df-445a-a867-557f284bd4b1/dynamic-time-warping-to-recognize-gestures?forum=kinectsdk I would also like to acknowledge RuneBerg as he appears to have used the same core codebase and I discovered that halfway through implementing this If this algorithm should not prove stable enough I will likely look into using a more complex and faster one in the future, I have several modifications to the base DTW algorithm noted from a few research papers. I only implemented this one first as it was a single header file and the quickest to implement.

Definition at line 305 of file VRGestureComponent.h.

Constructor & Destructor Documentation

◆ UVRGestureComponent()

UVRGestureComponent::UVRGestureComponent ( const FObjectInitializer & ObjectInitializer)

Definition at line 6 of file VRGestureComponent.cpp.

Member Function Documentation

◆ BeginDestroy()

void UVRGestureComponent::BeginDestroy ( )
override

Definition at line 685 of file VRGestureComponent.cpp.

Here is the call graph for this function:

◆ BeginRecording()

void UVRGestureComponent::BeginRecording ( bool bRunDetection,
bool bFlattenGesture = true,
bool bDrawGesture = true,
bool bDrawAsSpline = false,
int SamplingHTZ = 30,
int SampleBufferSize = 60,
float ClampingTolerance = 0.01f )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures")

Definition at line 119 of file VRGestureComponent.cpp.

Here is the call graph for this function:

◆ CaptureGestureFrame()

void UVRGestureComponent::CaptureGestureFrame ( )

Definition at line 170 of file VRGestureComponent.cpp.

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

◆ ClearRecording()

void UVRGestureComponent::ClearRecording ( )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures")

Definition at line 719 of file VRGestureComponent.cpp.

Here is the caller graph for this function:

◆ DrawDebugGesture()

void UVRGestureComponent::DrawDebugGesture ( UObject * WorldContextObject,
UPARAM(ref) FTransform & StartTransform,
FVRGesture GestureToDraw,
FColor const & Color,
bool bPersistentLines = false,
uint8 DepthPriority = 0,
float LifeTime = -1.f,
float Thickness = 0.f )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures", meta = (WorldContext = "WorldContextObject"))

Definition at line 473 of file VRGestureComponent.cpp.

Here is the caller graph for this function:

◆ dtw()

float UVRGestureComponent::dtw ( FVRGesture seq1,
FVRGesture seq2,
bool bMirrorGesture = false,
float Scaler = 1.f )

Definition at line 395 of file VRGestureComponent.cpp.

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

◆ EndRecording()

FVRGesture UVRGestureComponent::EndRecording ( )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures")

Definition at line 703 of file VRGestureComponent.cpp.

Here is the call graph for this function:

◆ GENERATED_BODY()

UVRGestureComponent::GENERATED_BODY ( )
private

◆ GetGestureDistance()

float UVRGestureComponent::GetGestureDistance ( FVector Seq1,
FVector Seq2,
bool bMirrorGesture = false )
inline

Definition at line 441 of file VRGestureComponent.h.

Here is the caller graph for this function:

◆ OnGestureDetected()

void UVRGestureComponent::OnGestureDetected ( uint8 GestureType,
FString & DetectedGestureName,
int & DetectedGestureIndex,
UGesturesDatabase * GestureDatabase )
BlueprintImplementableEvent

UFUNCTION(BlueprintImplementableEvent, Category = "BaseVRCharacter")

Here is the caller graph for this function:

◆ RecalculateGestureSize()

void UVRGestureComponent::RecalculateGestureSize ( UPARAM(ref) FVRGesture & InputGesture,
UGesturesDatabase * GestureDB )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures")

Definition at line 695 of file VRGestureComponent.cpp.

Here is the call graph for this function:

◆ RecognizeGesture()

void UVRGestureComponent::RecognizeGesture ( FVRGesture inputGesture)

Definition at line 322 of file VRGestureComponent.cpp.

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

◆ SaveRecording()

void UVRGestureComponent::SaveRecording ( UPARAM(ref) FVRGesture & Recording,
FString RecordingName,
bool bScaleRecordingToDatabase = true )
BlueprintCallable

UFUNCTION(BlueprintCallable, Category = "VRGestures")

Definition at line 724 of file VRGestureComponent.cpp.

Here is the call graph for this function:

◆ TickGesture()

void UVRGestureComponent::TickGesture ( )

Definition at line 289 of file VRGestureComponent.cpp.

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

Member Data Documentation

◆ bDrawRecordingGesture

bool UVRGestureComponent::bDrawRecordingGesture

Definition at line 413 of file VRGestureComponent.h.

◆ bDrawRecordingGestureAsSpline

bool UVRGestureComponent::bDrawRecordingGestureAsSpline

Definition at line 414 of file VRGestureComponent.h.

◆ bDrawSplinesCurved

bool UVRGestureComponent::bDrawSplinesCurved
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 371 of file VRGestureComponent.h.

◆ bGestureChanged

bool UVRGestureComponent::bGestureChanged

Definition at line 415 of file VRGestureComponent.h.

◆ bGetGestureInWorldSpace

bool UVRGestureComponent::bGetGestureInWorldSpace
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 379 of file VRGestureComponent.h.

◆ bRecordingFlattenGesture

bool UVRGestureComponent::bRecordingFlattenGesture

Definition at line 412 of file VRGestureComponent.h.

◆ CurrentState

EVRGestureState UVRGestureComponent::CurrentState
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "VRGestures")

Definition at line 432 of file VRGestureComponent.h.

◆ GestureLog

FVRGesture UVRGestureComponent::GestureLog
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "VRGestures")

Definition at line 439 of file VRGestureComponent.h.

◆ GesturesDB

UGesturesDatabase* UVRGestureComponent::GesturesDB
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 337 of file VRGestureComponent.h.

◆ maxSlope

int UVRGestureComponent::maxSlope
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 426 of file VRGestureComponent.h.

◆ MirroringHand

EVRGestureMirrorMode UVRGestureComponent::MirroringHand
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 353 of file VRGestureComponent.h.

◆ OnGestureDetected_Bind

FVRGestureDetectedSignature UVRGestureComponent::OnGestureDetected_Bind
BlueprintAssignable

UPROPERTY(BlueprintAssignable, Category = "VRGestures")

Definition at line 329 of file VRGestureComponent.h.

◆ OriginatingTransform

FTransform UVRGestureComponent::OriginatingTransform

Definition at line 468 of file VRGestureComponent.h.

◆ RecordingBufferSize

int UVRGestureComponent::RecordingBufferSize

Definition at line 409 of file VRGestureComponent.h.

◆ RecordingClampingTolerance

float UVRGestureComponent::RecordingClampingTolerance

Definition at line 411 of file VRGestureComponent.h.

◆ RecordingDelta

float UVRGestureComponent::RecordingDelta

Definition at line 406 of file VRGestureComponent.h.

◆ RecordingGestureDraw

FVRGestureSplineDraw UVRGestureComponent::RecordingGestureDraw

Definition at line 363 of file VRGestureComponent.h.

◆ SameSampleTolerance

float UVRGestureComponent::SameSampleTolerance
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 345 of file VRGestureComponent.h.

◆ SplineMaterial

UMaterialInterface* UVRGestureComponent::SplineMaterial
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 403 of file VRGestureComponent.h.

◆ SplineMesh

UStaticMesh* UVRGestureComponent::SplineMesh
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 387 of file VRGestureComponent.h.

◆ SplineMeshScaler

FVector2D UVRGestureComponent::SplineMeshScaler
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 395 of file VRGestureComponent.h.

◆ StartVector

FVector UVRGestureComponent::StartVector

Definition at line 467 of file VRGestureComponent.h.

◆ TargetCharacter

AVRBaseCharacter* UVRGestureComponent::TargetCharacter
BlueprintReadWriteEditAnywhere

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "VRGestures")

Definition at line 361 of file VRGestureComponent.h.

◆ TickGestureTimer_Handle

FTimerHandle UVRGestureComponent::TickGestureTimer_Handle

Definition at line 418 of file VRGestureComponent.h.


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