-
Notifications
You must be signed in to change notification settings - Fork 3
/
MyActor_capture.h
73 lines (51 loc) · 1.65 KB
/
MyActor_capture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Async/Async.h"
#include "Kismet/KismetSystemLibrary.h"
#include "SocketSubsystem.h"
#include "Sockets.h"
#include "Networking.h"
#include "Misc/FileHelper.h"
#include "IPAddress.h"
#include "HAL/ThreadSafeBool.h"
#include "MyActor_capture.generated.h"
UCLASS()
class ML_TEST01_API AMyActor_capture : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor_capture();
UPROPERTY(EditAnywhere)
USceneCaptureComponent2D* Camera;
UTextureRenderTarget2D* RenderTarget;
UTexture2D* Texture2D;
UMaterial* mSnapshotMaterial;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* cubetto;
const uint8* PIPPO;
UTexture2D* TextureStatica;
TArray<uint8> FrameMandabile;
FTexturePlatformData* Data;
// ricezione di dati da Python
uint32 DataSize = 1;
uint8 DatiRicevuti[16];
int32 QuantiDatiLetti = 0;
UPROPERTY(BlueprintReadWrite)
int NumeroFacceRicevuto;
protected:
// Called when the game starts or when spawned
FSocket* ClientSocket;
bool ConnessioneAttiva = false;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
virtual void BeginPlay() override;
TArray<uint8> fStringToBytes(FString InString); // per mandare stringe
UFUNCTION(BlueprintCallable, Category = "AA")
bool Emit(const TArray<uint8>& Bytes); //funzione che manda bytes
UFUNCTION(BlueprintCallable, Category = "AA")
bool EmitStr(FString str); //funzione che manda stringhe
};