public interface ARSKViewDelegate extends SKViewDelegate, ARSessionObserver
| Modifier and Type | Method and Description |
|---|---|
default void |
viewDidAddNodeForAnchor(ARSKView view,
SKNode node,
ARAnchor anchor)
Called when a new node has been mapped to the given anchor.
|
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.
|
default void |
viewDidUpdateNodeForAnchor(ARSKView view,
SKNode node,
ARAnchor anchor)
Called when a node has been updated with data from the given anchor.
|
default SKNode |
viewNodeForAnchor(ARSKView view,
ARAnchor anchor)
Implement this to provide a custom node for the given anchor.
|
default void |
viewWillUpdateNodeForAnchor(ARSKView view,
SKNode node,
ARAnchor anchor)
Called when a node will be updated with data from the given anchor.
|
viewShouldRenderAtTimesessionCameraDidChangeTrackingState, sessionDidChangeGeoTrackingStatus, sessionDidFailWithError, sessionDidOutputAudioSampleBuffer, sessionDidOutputCollaborationData, sessionInterruptionEnded, sessionShouldAttemptRelocalization, sessionWasInterrupteddefault void viewDidAddNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)
view - The view that will render the scene.node - The node that maps to the anchor.anchor - The added anchor.default void viewDidRemoveNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)
view - The view that will render the scene.node - The node that was removed.anchor - The anchor that was removed.default void viewDidUpdateNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)
view - The view that will render the scene.node - The node that was updated.anchor - The anchor that was updated.default SKNode viewNodeForAnchor(ARSKView view, ARAnchor 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.
view - The view that will render the scene.anchor - The added anchor.default void viewWillUpdateNodeForAnchor(ARSKView view, SKNode node, ARAnchor anchor)
view - The view that will render the scene.node - The node that will be updated.anchor - The anchor that was updated.