【发布时间】:2017-12-01 10:21:06
【问题描述】:
虚幻引擎 (C++)
嗨,我有一个来自 TCP 连接的 TArray 字节。我有 58 字节的标头和 12 x 4 字节的 Float32。我需要从我的 Array Bytes 中提取 12 个 float32 数字,我尝试过这段代码来提取第一个数字,但每次结果都是错误的:
float ReceivedUE4float32;
ReceivedUE4float32 = float(ReceivedData[58]); //58 index of first float32
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("Dato intdex 58 ~> %f"), ReceivedUE4float32));
有人可以帮我吗?
套接字:https://github.com/openigtlink/OpenIGTLink/blob/release-3.0/Documents/Protocol/index.md
转换(12x4 字节):https://github.com/openigtlink/OpenIGTLink/blob/release-3.0/Documents/Protocol/transform.md
【问题讨论】:
标签: c++ sockets unreal-engine4