Package apple.arkit.protocol
Interface ARSKViewDelegate
-
- All Superinterfaces:
ARSessionObserver,SKViewDelegate
public interface ARSKViewDelegate extends SKViewDelegate, ARSessionObserver
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidviewDidAddNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)Called when a new node has been mapped to the given anchor.default voidviewDidRemoveNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)Called when a mapped node has been removed from the scene graph for the given anchor.default voidviewDidUpdateNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)Called when a node has been updated with data from the given anchor.default SKNodeviewNodeForAnchor(ARSKView view, ARAnchor anchor)Implement this to provide a custom node for the given anchor.default voidviewWillUpdateNodeForAnchor(ARSKView view, SKNode node, 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(ARSKView view, SKNode node, 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(ARSKView view, SKNode node, 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(ARSKView view, SKNode node, 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
default SKNode viewNodeForAnchor(ARSKView view, 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(ARSKView view, SKNode node, 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.
-
-