Use separate packet to send generic tracker poses
This commit is contained in:
+23
-1
@@ -116,7 +116,6 @@ enum class device_id : uint8_t
|
||||
RIGHT_TRACKPAD_FORCE, // /user/hand/right/input/trackpad/force
|
||||
RIGHT_STYLUS_FORCE, // /user/hand/right/input/stylus_fb/force
|
||||
EYE_GAZE, // /user/eyes_ext/input/gaze_ext/pose
|
||||
GENERIC_TRACKER,
|
||||
};
|
||||
|
||||
enum class interaction_profile : uint8_t
|
||||
@@ -339,6 +338,28 @@ struct hand_tracking
|
||||
std::optional<std::array<pose, XR_HAND_JOINT_COUNT_EXT>> joints;
|
||||
};
|
||||
|
||||
struct body_tracking
|
||||
{
|
||||
inline static const size_t max_tracked_poses = 16;
|
||||
enum flags : uint8_t
|
||||
{
|
||||
orientation_valid = 1 << 0,
|
||||
position_valid = 1 << 1,
|
||||
orientation_tracked = 1 << 2,
|
||||
position_tracked = 1 << 3,
|
||||
};
|
||||
struct pose
|
||||
{
|
||||
XrPosef pose{};
|
||||
// maybe add velocity?
|
||||
uint8_t flags{0};
|
||||
};
|
||||
|
||||
XrTime production_timestamp;
|
||||
XrTime timestamp;
|
||||
std::optional<std::array<pose, max_tracked_poses>> poses;
|
||||
};
|
||||
|
||||
struct inputs
|
||||
{
|
||||
struct input_value
|
||||
@@ -401,6 +422,7 @@ using packets = std::variant<
|
||||
trackings,
|
||||
derived_pose,
|
||||
hand_tracking,
|
||||
body_tracking,
|
||||
inputs,
|
||||
timesync_response,
|
||||
battery,
|
||||
|
||||
Reference in New Issue
Block a user