//====================================================================================================== // Copyright 2025, Rokoko Glove OptiTrack Integration //====================================================================================================== /** * RokokoData.h defines the data structures for Rokoko Studio LiveFrame_v4 format. * These structures match the JSON format used by Rokoko Unity scripts. */ #pragma once #include #include #include namespace RokokoData { // Vector3 structure for position data struct Vector3Frame { float x = 0.0f; float y = 0.0f; float z = 0.0f; }; // Vector4 structure for quaternion rotation data struct Vector4Frame { float x = 0.0f; float y = 0.0f; float z = 0.0f; float w = 1.0f; }; // Actor joint frame containing position and rotation struct ActorJointFrame { Vector3Frame position; Vector4Frame rotation; }; // Body structure containing full skeleton (Unity BodyFrame와 동일) struct Body { // 전신 스켈레톤 데이터 (Unity BodyFrame과 동일) std::shared_ptr hip; std::shared_ptr spine; std::shared_ptr chest; std::shared_ptr neck; std::shared_ptr head; std::shared_ptr leftShoulder; std::shared_ptr leftUpperArm; std::shared_ptr leftLowerArm; std::shared_ptr leftHand; std::shared_ptr rightShoulder; std::shared_ptr rightUpperArm; std::shared_ptr rightLowerArm; std::shared_ptr rightHand; // 다리 데이터 (필요시) std::shared_ptr leftUpLeg; std::shared_ptr leftLeg; std::shared_ptr leftFoot; std::shared_ptr leftToe; std::shared_ptr leftToeEnd; std::shared_ptr rightUpLeg; std::shared_ptr rightLeg; std::shared_ptr rightFoot; std::shared_ptr rightToe; std::shared_ptr rightToeEnd; // Left hand finger joints std::shared_ptr leftThumbProximal; std::shared_ptr leftThumbMedial; std::shared_ptr leftThumbDistal; std::shared_ptr leftThumbTip; std::shared_ptr leftIndexProximal; std::shared_ptr leftIndexMedial; std::shared_ptr leftIndexDistal; std::shared_ptr leftIndexTip; std::shared_ptr leftMiddleProximal; std::shared_ptr leftMiddleMedial; std::shared_ptr leftMiddleDistal; std::shared_ptr leftMiddleTip; std::shared_ptr leftRingProximal; std::shared_ptr leftRingMedial; std::shared_ptr leftRingDistal; std::shared_ptr leftRingTip; std::shared_ptr leftLittleProximal; std::shared_ptr leftLittleMedial; std::shared_ptr leftLittleDistal; std::shared_ptr leftLittleTip; // Right hand finger joints (similar structure) std::shared_ptr rightThumbProximal; std::shared_ptr rightThumbMedial; std::shared_ptr rightThumbDistal; std::shared_ptr rightThumbTip; std::shared_ptr rightIndexProximal; std::shared_ptr rightIndexMedial; std::shared_ptr rightIndexDistal; std::shared_ptr rightIndexTip; std::shared_ptr rightMiddleProximal; std::shared_ptr rightMiddleMedial; std::shared_ptr rightMiddleDistal; std::shared_ptr rightMiddleTip; std::shared_ptr rightRingProximal; std::shared_ptr rightRingMedial; std::shared_ptr rightRingDistal; std::shared_ptr rightRingTip; std::shared_ptr rightLittleProximal; std::shared_ptr rightLittleMedial; std::shared_ptr rightLittleDistal; std::shared_ptr rightLittleTip; }; // Actor data structure struct ActorData { std::string id; std::string name; Body body; }; // Scene structure containing actors struct SceneFrame { std::vector actors; }; // Main LiveFrame_v4 structure struct LiveFrame_v4 { double timestamp = 0.0; SceneFrame scene; }; }