objc2_vision/generated/VNDetectHumanBodyPose3DRequest.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-media")]
6use objc2_core_media::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 /// A request that detects specific landmark points on human bodies in 3D space relative to the camera.
13 /// When possible,`AVDepthData` depth information is used to produce more accurate results, but the request does not require it to run.
14 ///
15 /// This request generates a collection of VNHumanBodyPose3DObservation objects which describe the position of each detected body
16 ///
17 /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecthumanbodypose3drequest?language=objc)
18 #[unsafe(super(VNStatefulRequest, VNImageBasedRequest, VNRequest, NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
21 pub struct VNDetectHumanBodyPose3DRequest;
22);
23
24#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
25extern_conformance!(
26 unsafe impl NSCopying for VNDetectHumanBodyPose3DRequest {}
27);
28
29#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
30unsafe impl CopyingHelper for VNDetectHumanBodyPose3DRequest {
31 type Result = Self;
32}
33
34#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for VNDetectHumanBodyPose3DRequest {}
37);
38
39#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
40impl VNDetectHumanBodyPose3DRequest {
41 extern_methods!(
42 /// Creates a new VNDetectHumanBodyPose3DRequest with no completion handler.
43 #[unsafe(method(init))]
44 #[unsafe(method_family = init)]
45 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47 #[cfg(feature = "block2")]
48 /// Creates a new VNDetectHumanBodyPose3DRequest with completion handler.
49 ///
50 /// # Safety
51 ///
52 /// `completion_handler` must be a valid pointer or null.
53 #[unsafe(method(initWithCompletionHandler:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithCompletionHandler(
56 this: Allocated<Self>,
57 completion_handler: VNRequestCompletionHandler,
58 ) -> Retained<Self>;
59
60 #[cfg(feature = "VNTypes")]
61 /// Obtain the collection of human body joint names that are supported by a given request revision.
62 ///
63 /// Parameter `error`: The address of a variable that will be populated with an error upon failure. If the caller does not need this information, NULL can be passed.
64 ///
65 /// Returns: An array of VNHumanBodyPose3DObservationJointName symbols that are supported by the request revision, or nil if a failure occurs.
66 #[unsafe(method(supportedJointNamesAndReturnError:_))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn supportedJointNamesAndReturnError(
69 &self,
70 ) -> Result<Retained<NSArray<VNHumanBodyPose3DObservationJointName>>, Retained<NSError>>;
71
72 #[cfg(feature = "VNTypes")]
73 /// Obtain the collection of human body joints group names that are supported by a request object configured with a request revision.
74 ///
75 /// Parameter `error`: The address of a variable that will be populated with an error upon failure. If the caller does not need this information, NULL can be passed.
76 ///
77 /// Returns: An array of VNHumanBody3DPoseObservationJointsGroupName symbols that are supported by the request, or nil if a failure occurs.
78 #[unsafe(method(supportedJointsGroupNamesAndReturnError:_))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn supportedJointsGroupNamesAndReturnError(
81 &self,
82 ) -> Result<Retained<NSArray<VNHumanBodyPose3DObservationJointsGroupName>>, Retained<NSError>>;
83
84 #[cfg(feature = "VNObservation")]
85 /// VNHumanBodyPose3DObservation results.
86 #[unsafe(method(results))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn results(&self) -> Option<Retained<NSArray<VNHumanBodyPose3DObservation>>>;
89 );
90}
91
92/// Methods declared on superclass `VNStatefulRequest`.
93#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
94impl VNDetectHumanBodyPose3DRequest {
95 extern_methods!(
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new() -> Retained<Self>;
99
100 #[cfg(all(feature = "block2", feature = "objc2-core-media"))]
101 /// Create a new video-based stateful request.
102 ///
103 ///
104 /// Parameter `frameAnalysisSpacing`: The reciprocal of maximum rate at which buffers will be processed. The request will not process buffers that fall within the frameAnalysisSpacing after it has performed the analysis. The analysis is not done by wall time but by analysis of of the time stamps of the samplebuffers being processed.
105 ///
106 /// Parameter `completionHandler`: The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
107 ///
108 /// # Safety
109 ///
110 /// `completion_handler` must be a valid pointer or null.
111 #[unsafe(method(initWithFrameAnalysisSpacing:completionHandler:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithFrameAnalysisSpacing_completionHandler(
114 this: Allocated<Self>,
115 frame_analysis_spacing: CMTime,
116 completion_handler: VNRequestCompletionHandler,
117 ) -> Retained<Self>;
118 );
119}
120
121/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecthumanbodypose3drequestrevision1?language=objc)
122pub static VNDetectHumanBodyPose3DRequestRevision1: NSUInteger = 1;