3#include "CoreMinimal.h"
4#include "Components/ActorComponent.h"
17#include "WeArtTouchableObject.generated.h"
24UCLASS( ClassGroup=(Custom), Blueprintable, meta=(BlueprintSpawnableComponent) )
25class WEARTPLUGIN_API UWeArtTouchableObject :
public UActorComponent
31 UWeArtTouchableObject();
36 UPROPERTY(EditAnywhere, Meta = (DisplayName = "Temperature"))
38 UPROPERTY(EditAnywhere, Meta = (DisplayName = "Stiffness"))
40 UPROPERTY(EditAnywhere, Meta = (DisplayName = "Texture"))
43 UPROPERTY(EditAnywhere, Meta = (DisplayName = "Volume Texture", ClampMin = 0.0, ClampMax = 100.0))
47 AActor* grasperActor =
nullptr;
48 UWeArtHapticObject* thumbHapticObject;
49 UWeArtHapticObject* indexHapticObject;
50 UWeArtHapticObject* middleHapticObject;
53 virtual
void BeginPlay() override;
56 bool isSimulatingPhysics;
59 UPROPERTY(EditAnywhere, Meta = (DisplayName = "Graspable"))
62 UPROPERTY(NoClear, Meta = (DisplayName = "Collision Multiplier", ClampMin = 0.0, ClampMax = 100.0))
63 float CollisionMultiplier =
WeArtConstants::defaultCollisionMultiplier;
66 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
72 void BeginOverlap(AActor* MyOverlappedActor, AActor* OtherActor);
74 void EndOverlap(AActor* MyOverlappedActor, AActor* OtherActor);
76 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
77 void UpdateTemperature(
bool active,
float value);
78 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
79 void UpdateStiffness(
bool active,
float value);
80 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
81 void UpdateTexture(
bool active,
TextureType textureType);
83 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
84 float GetTemperatureValue();
85 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
86 float GetStiffnessValue();
87 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
89 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
90 float GetTextureVolume();
91 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
92 void UpdateIsForcedVelocity(
bool value);
93 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
94 bool GetIsForcedVelocity();
95 UFUNCTION(BlueprintCallable, Category = "WEART TouchableObject")
96 void UpdateTextureVolume(
float value);
98 void Grab(AActor* grasper, UWeArtHapticObject* thumbHaptic, UWeArtHapticObject* indexHaptic, UWeArtHapticObject* middleHaptic);
100 void ComputeDynamicGraspForce(
float thumbClosureValue,
float middleClosureValue,
float indexClosureValue);
101 void SetEffectGraspForce(
float thumbForce,
float indexForce,
float middleForce);
106 std::set<UWeArtHapticObject*> touchedHapticObjects;
TextureType
Definition: WeArtCommon.h:48
GraspingState
Definition: WeArtCommon.h:40
@ Released
Definition: WeArtCommon.h:42
Effect to be applied to the thimble.
Definition: WeArtTouchEffect.h:22
Definition: WeArtCommon.h:71
Force value to be applied to an effect.
Definition: WeArtForce.h:11
Temperature value to be applied to an effect.
Definition: WeArtTemperature.h:11
Texture information to be applied to an effect.
Definition: WeArtTexture.h:11