Package apple.arkit.protocol
Interface ARSKViewDelegate
-
- All Superinterfaces:
ARSessionObserver,SKViewDelegate
public interface ARSKViewDelegate extends SKViewDelegate, ARSessionObserver
API-Since: 11.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidviewDidAddNodeForAnchor(@NotNull ARSKView view, @NotNull SKNode node, @NotNull ARAnchor anchor)Called when a new node has been mapped to the given anchor.default voidviewDidRemoveNodeForAnchor(@NotNull ARSKView view, @NotNull SKNode node, @NotNull ARAnchor anchor)Called when a mapped node has been removed from the scene graph for the given anchor.default voidviewDidUpdateNodeForAnchor(@NotNull ARSKView view, @NotNull SKNode node, @NotNull ARAnchor anchor)Called when a node has been updated with data from the given anchor.default @Nullable SKNodeviewNodeForAnchor(@NotNull ARSKView view, @NotNull ARAnchor anchor)Implement this to provide a custom node for the given anchor.default voidviewWillUpdateNodeForAnchor(@NotNull ARSKView view, @NotNull SKNode node, @NotNull ARAnchor anchor)Called when a node will be updated with data from the given anchor.-
Methods inherited from interface apple.arkit.protocol.ARSessionObserver
sessionCameraDidChangeTrackingState, sessionDidChangeGeoTrackingStatus, sessionDidFailWithError, sessionDidOutputAudioSampleBuffer, sessionDidOutputCollaborationData, sessionInterruptionEnded, sessionShouldAttemptRelocalization, sessionWasInterrupted
-
Methods inherited from interface apple.spritekit.protocol.SKViewDelegate
viewShouldRenderAtTime
-
-
-
-
Method Detail
-
viewDidAddNodeForAnchor
default void viewDidAddNodeForAnchor(@NotNull @NotNull ARSKView view, @NotNull @NotNull SKNode node, @NotNull @NotNull ARAnchor anchor)Called when a new node has been mapped to the given anchor.- Parameters:
view- The view that will render the scene.node- The node that maps to the anchor.anchor- The added anchor.
-
viewDidRemoveNodeForAnchor
default void viewDidRemoveNodeForAnchor(@NotNull @NotNull ARSKView view, @NotNull @NotNull SKNode node, @NotNull @NotNull ARAnchor anchor)Called when a mapped node has been removed from the scene graph for the given anchor.- Parameters:
view- The view that will render the scene.node- The node that was removed.anchor- The anchor that was removed.
-
viewDidUpdateNodeForAnchor
default void viewDidUpdateNodeForAnchor(@NotNull @NotNull ARSKView view, @NotNull @NotNull SKNode node, @NotNull @NotNull ARAnchor anchor)Called when a node has been updated with data from the given anchor.- Parameters:
view- The view that will render the scene.node- The node that was updated.anchor- The anchor that was updated.
-
viewNodeForAnchor
@Nullable default @Nullable SKNode viewNodeForAnchor(@NotNull @NotNull ARSKView view, @NotNull @NotNull ARAnchor anchor)
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.- Parameters:
view- The view that will render the scene.anchor- The added anchor.- Returns:
- Node that will be mapped to the anchor or nil.
-
viewWillUpdateNodeForAnchor
default void viewWillUpdateNodeForAnchor(@NotNull @NotNull ARSKView view, @NotNull @NotNull SKNode node, @NotNull @NotNull ARAnchor anchor)Called when a node will be updated with data from the given anchor.- Parameters:
view- The view that will render the scene.node- The node that will be updated.anchor- The anchor that was updated.
-
-