Other types
public struct Pose: Sendable { var points: [Joint: CGPoint] var timestamp: TimeInterval var imageSize: CGSize? var confidence: [Joint: Double]
init(points:timestamp:imageSize: = nil, confidence: = [:]) subscript(joint: Joint) -> CGPoint? func confidence(of joints: [Joint]) -> Double?}See The Pose contract.
public enum Joint: String, CaseIterable, Sendablenose, leftEye, rightEye, leftEar, rightEar, neck, leftShoulder, rightShoulder, leftElbow, rightElbow, leftWrist, rightWrist, root, leftHip, rightHip, leftKnee, rightKnee, leftAnkle, rightAnkle.
Shortcuts: Joint.ear(_:), .shoulder(_:), .elbow(_:), .wrist(_:), .hip(_:), .knee(_:), .ankle(_:).
BodySide
Section titled “BodySide”public enum BodySide: String, CaseIterable, Sendable, Codable { case left, right var opposite: BodySide}Always the patient’s anatomical side.
MotionEvent
Section titled “MotionEvent”public enum MotionEvent: Sendable, Equatable { case repCompleted(Rep) case repRejected(Rep) case holdStarted case formFault(FormFeedback) case visibilityChanged(Visibility) case baselineCompleted(Double) case setupChanged(Set<SetupIssue>)}See Events and snapshot.
Visibility
Section titled “Visibility”public struct Visibility: Sendable, Equatable { let isVisible: Bool let missingJoints: [Joint] // empty when visible}SetupIssue
Section titled “SetupIssue”public enum SetupIssue: String, Sendable, CaseIterable, Codable { case turnSideways, faceCamera, moveCloser, stepBack}SetupCheck
Section titled “SetupCheck”public struct SetupCheck: Sendable { var maxSideRatio = 0.45 var minFrontRatio = 0.35 var minSpan = 0.15 var edgeMargin = 0.03
init() func issues(in pose: Pose, exercise: ExerciseDefinition, side: BodySide) -> Set<SetupIssue>}See Measurement quality.