1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-scene-kit")]
use objc2_scene_kit::*;
use crate::*;
#[cfg(feature = "objc2")]
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/arkit/arscnviewdelegate?language=objc)
#[cfg(all(feature = "ARSession", feature = "objc2", feature = "objc2-scene-kit"))]
pub unsafe trait ARSCNViewDelegate:
SCNSceneRendererDelegate + ARSessionObserver
{
#[cfg(feature = "ARAnchor")]
/// Implement this to provide a custom node for the given anchor.
///
///
/// This node will automatically be added to the scene graph.
/// If this method is not implemented, a node will be automatically created.
/// If nil is returned the anchor will be ignored.
///
/// Parameter `renderer`: The renderer that will render the scene.
///
/// Parameter `anchor`: The added anchor.
///
/// Returns: Node that will be mapped to the anchor or nil.
#[optional]
#[unsafe(method(renderer:nodeForAnchor:))]
#[unsafe(method_family = none)]
unsafe fn renderer_nodeForAnchor(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
anchor: &ARAnchor,
) -> Option<Retained<SCNNode>>;
#[cfg(feature = "ARAnchor")]
/// Called when a new node has been mapped to the given anchor.
///
///
/// Parameter `renderer`: The renderer that will render the scene.
///
/// Parameter `node`: The node that maps to the anchor.
///
/// Parameter `anchor`: The added anchor.
#[optional]
#[unsafe(method(renderer:didAddNode:forAnchor:))]
#[unsafe(method_family = none)]
unsafe fn renderer_didAddNode_forAnchor(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
node: &SCNNode,
anchor: &ARAnchor,
);
#[cfg(feature = "ARAnchor")]
/// Called when a node will be updated with data from the given anchor.
///
///
/// Parameter `renderer`: The renderer that will render the scene.
///
/// Parameter `node`: The node that will be updated.
///
/// Parameter `anchor`: The anchor that was updated.
#[optional]
#[unsafe(method(renderer:willUpdateNode:forAnchor:))]
#[unsafe(method_family = none)]
unsafe fn renderer_willUpdateNode_forAnchor(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
node: &SCNNode,
anchor: &ARAnchor,
);
#[cfg(feature = "ARAnchor")]
/// Called when a node has been updated with data from the given anchor.
///
///
/// Parameter `renderer`: The renderer that will render the scene.
///
/// Parameter `node`: The node that was updated.
///
/// Parameter `anchor`: The anchor that was updated.
#[optional]
#[unsafe(method(renderer:didUpdateNode:forAnchor:))]
#[unsafe(method_family = none)]
unsafe fn renderer_didUpdateNode_forAnchor(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
node: &SCNNode,
anchor: &ARAnchor,
);
#[cfg(feature = "ARAnchor")]
/// Called when a mapped node has been removed from the scene graph for the given anchor.
///
///
/// Parameter `renderer`: The renderer that will render the scene.
///
/// Parameter `node`: The node that was removed.
///
/// Parameter `anchor`: The anchor that was removed.
#[optional]
#[unsafe(method(renderer:didRemoveNode:forAnchor:))]
#[unsafe(method_family = none)]
unsafe fn renderer_didRemoveNode_forAnchor(
&self,
renderer: &ProtocolObject<dyn SCNSceneRenderer>,
node: &SCNNode,
anchor: &ARAnchor,
);
}
);
/// Extended debug options for an ARSCNView
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arscndebugoptions?language=objc)
#[cfg(feature = "objc2-scene-kit")]
pub type ARSCNDebugOptions = SCNDebugOptions;
extern "C" {
/// Show the world origin in the scene.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arscndebugoptionshowworldorigin?language=objc)
#[cfg(feature = "objc2-scene-kit")]
pub static ARSCNDebugOptionShowWorldOrigin: SCNDebugOptions;
}
extern "C" {
/// Show detected 3D feature points in the world.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arscndebugoptionshowfeaturepoints?language=objc)
#[cfg(feature = "objc2-scene-kit")]
pub static ARSCNDebugOptionShowFeaturePoints: SCNDebugOptions;
}