ARCore 是否像 ARKit 一样具有会话的委托方法?

Does ARCore have session's delegate methods like ARKit has?

在 ARKit 中有一个 ARSessionDelegate 协议,它有 4 个主要方法,您可以实施它来从 AR 会话接收捕获的视频帧图像和跟踪状态。

ARCore API是否有类似方法的类似协议(接口)?

override func viewDidLoad() {  
    super.viewDidLoad()
    sceneView.session.delegate = self       // ARSessionDelegate? protocol
}
  1. This method provides a newly captured ARCamera image and accompanying AR information to the delegate:
func session(ARSession, didUpdate: ARFrame) { ... }
  1. This method tells the delegate that one or more ARAnchors have been added to the session:
func session(ARSession, didAdd: [ARAnchor]) { ... }
  1. This method tells the delegate that the ARSession has adjusted the properties of one or more ARAnchors:
func session(ARSession, didUpdate: [ARAnchor]) { ... }
  1. This method tells the delegate that one or more ARAnchors have been removed from the ARSession:
func session(ARSession, didRemove: [ARAnchor]) { ... }

如果 ARCore 中存在类似的方法(即使不是全部),请告诉我它们使用 Kotlin 代码的样子。

感谢任何帮助。

在阅读 ARCore 文档后,我发现了至少两种类似的方法:

First: This method is used for receiving a new camera frame, updating the location of the device, updating the location of tracking anchors, updating detected planes, etc.

ArStatus ArSession_update(ArSession *session, ArFrame *out_frame)

Second: This method defines a tracked location in the physical world:

ArStatus ArSession_acquireNewAnchor(ArSession *session, const ArPose *pose, ArAnchor **out_anchor)