railbird-gql/rbproto/shot.proto

74 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package serialized_shot;
2024-05-24 14:28:41 -06:00
message Box {
2024-09-11 14:46:14 -06:00
float left = 1;
float top = 2;
float width = 3;
float height = 4;
2024-05-24 14:28:41 -06:00
}
message Point {
float x = 1;
float y = 2;
2024-05-24 14:28:41 -06:00
}
message BallDetection {
2024-09-11 14:46:14 -06:00
Point plane_position = 1;
Box annotation = 2;
bool interpolated = 3;
2024-05-24 14:28:41 -06:00
}
message RLEBallDetection {
2024-09-11 14:46:14 -06:00
BallDetection detection = 1;
uint32 count = 2;
2024-05-24 14:28:41 -06:00
}
2024-09-13 17:54:17 -06:00
message RLEDetectionHistory { repeated RLEBallDetection detections = 1; }
2024-05-24 14:28:41 -06:00
2024-09-13 17:54:17 -06:00
message DetectionHistory { repeated BallDetection detections = 1; }
2024-09-10 14:31:57 -06:00
message CollisionInfo {
uint32 source = 1;
map<uint32, Point> ball_identifiers = 2;
uint32 wall_identifier = 3;
uint32 frame_index = 4;
bool static = 5;
}
message Path {
2024-05-24 14:28:41 -06:00
uint32 start_frame = 1;
uint32 end_frame = 2;
oneof detection_history {
2024-09-10 14:31:57 -06:00
DetectionHistory detections = 3;
RLEDetectionHistory rle_detections = 4;
bool not_present = 5;
2024-05-24 14:28:41 -06:00
}
bool is_static = 6;
2024-09-10 14:31:57 -06:00
CollisionInfo start_info = 7;
CollisionInfo end_info = 8;
}
2024-05-24 14:28:41 -06:00
message IdentifierHistory {
uint32 ball_identifier = 1;
repeated Path paths = 2;
}
2024-09-11 14:46:14 -06:00
message KeyBallIdentifiers {
uint32 cue_ball = 1;
uint32 object_ball = 2;
uint32 target_ball = 3;
// For now this will just be cue->object/target->target
// Long term this will potentially represent a linked list
// of all balls in a shot.
repeated uint32 contact_sequence = 4;
}
message Shot {
2024-05-24 14:28:41 -06:00
repeated IdentifierHistory identifier_histories = 3;
2024-09-11 14:46:14 -06:00
KeyBallIdentifiers key_balls = 4;
2024-09-13 17:54:17 -06:00
uint32 start_index = 5;
uint32 end_index = 6;
2024-05-24 14:28:41 -06:00
}