Documentation for the Unreal C++ Plugin
Loading...
Searching...
No Matches
PixoVRInteractiveObject.h
Go to the documentation of this file.
1// Copyright(c) Pixo Group. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "MotionControllerComponent.h"
7#include "PixoVRInteractiveObject.generated.h"
8
12USTRUCT(BlueprintType)
14{
17 UPROPERTY(BlueprintReadWrite)
18 UStaticMeshComponent* MeshRef;
19
20 UPROPERTY(BlueprintReadWrite)
21 TArray<UMaterialInstance*> MI_OpaqueMaterials;
22
23 UPROPERTY(BlueprintReadWrite)
24 TArray<UMaterialInstance*> MI_TransparentMaterials;
26};
27
28USTRUCT(BlueprintType)
32
33 UPROPERTY(BlueprintReadWrite)
34 float ZAxisOffsetInHands = 0.0;
35 UPROPERTY(BlueprintReadWrite)
36 float ControllerDetachDistance = 15.0;
37 UPROPERTY(BlueprintReadWrite)
38 float TwoHandUpdateFrequency = 0.01;
39 UPROPERTY(BlueprintReadWrite)
40 TArray<UStaticMeshComponent*> FakeHands;
41 UPROPERTY(BlueprintReadWrite)
42 bool EnableFlip = true;
43 UPROPERTY(BlueprintReadWrite)
44 bool EnableDebug = false;
45
46};
47
48
49UINTERFACE(MinimalAPI)
50class UPixoVRStoryObject : public UInterface
51{
53};
54
58class PIXOCORE_API IPixoVRStoryObject
59{
60 GENERATED_BODY()
61
62public:
63 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
64 void ObjectActivated();
65
66 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
67 void ObjectDeactivated();
68
69 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
70 bool IsObjectActive();
71
72 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Fadable")
73 TArray<FTransparentMaterialData> GetActorTransparentMaterialData();
74
75 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Hint")
76 void UpdateObjectHighlight(bool Activate);
78 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
79 bool HoldItemByClick();
80
81 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
82 bool ReleaseItemByPress();
83
84 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
85 bool DenyDropping();
87 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
88 void SetDenyDropping(const bool bDenyDropping);
89
90 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
91 bool CouldBeGrabbedByOtherHand();
92
93 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
94 bool IsGrabbingWrongActorActive();
95
96 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
97 void SendWrongGrabbingNotification();
98
99 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
100 FTransform GetObjectGrabTransform(APixoVRHand* GrabbedHand);
101
102 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
103 bool CouldBeGrabbedWithTwoHands();
105 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
106 void GrabWithTwoHands(UMotionControllerComponent* GrabbingController);
107
108 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
109 void ReleaseTwoHands(UMotionControllerComponent* ReleasingController);
110
111 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
112 bool IsObjectHeldWithTwoHands();
113
114 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
115 FTwoHandProperties GetTwoHandProperties();
116
117 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
118 void EnableOnePressDetach(bool Enable);
119
120 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
121 void ResetTwoHandsHoldingFunctionality();
122};
APixoVRHand is an actor class that represents a hand in the VR environment.
Definition PixoVRHand.h:99
Interface for PixoVR story object functionality.
bool ReleaseItemByPress()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
bool IsGrabbingWrongActorActive()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
GENERATED_BODY()
bool IsObjectHeldWithTwoHands()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
void GrabWithTwoHands(UMotionControllerComponent *GrabbingController)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
void ObjectActivated()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
bool DenyDropping()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
void SendWrongGrabbingNotification()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
void ReleaseTwoHands(UMotionControllerComponent *ReleasingController)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
TArray< FTransparentMaterialData > GetActorTransparentMaterialData()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Fadable")
void SetDenyDropping(const bool bDenyDropping)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
void EnableOnePressDetach(bool Enable)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
FTwoHandProperties GetTwoHandProperties()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
bool CouldBeGrabbedByOtherHand()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
void ObjectDeactivated()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
bool IsObjectActive()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Story")
bool HoldItemByClick()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
void ResetTwoHandsHoldingFunctionality()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
void UpdateObjectHighlight(bool Activate)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Hint")
FTransform GetObjectGrabTransform(APixoVRHand *GrabbedHand)
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior")
bool CouldBeGrabbedWithTwoHands()
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Grip Behavior|Two Hands")
UINTERFACE(MinimalAPI)
GENERATED_BODY()
Struct used in Fadable component.
TArray< UMaterialInstance * > MI_OpaqueMaterials
UPROPERTY(BlueprintReadWrite)
UStaticMeshComponent * MeshRef
UPROPERTY(BlueprintReadWrite)
TArray< UMaterialInstance * > MI_TransparentMaterials
UPROPERTY(BlueprintReadWrite)
USTRUCT(BlueprintType)
bool EnableFlip
UPROPERTY(BlueprintReadWrite)
float ZAxisOffsetInHands
UPROPERTY(BlueprintReadWrite)
float TwoHandUpdateFrequency
UPROPERTY(BlueprintReadWrite)
bool EnableDebug
UPROPERTY(BlueprintReadWrite)
TArray< UStaticMeshComponent * > FakeHands
UPROPERTY(BlueprintReadWrite)
float ControllerDetachDistance
UPROPERTY(BlueprintReadWrite)