Created
March 4, 2019 14:34
-
-
Save giln/73dae2b5fb99837d1dedf7ef0f68e3b9 to your computer and use it in GitHub Desktop.
ARViewController #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ARKit | |
class ARViewController: UIViewController, ARSessionDelegate { | |
// MARK: - Variables | |
let sceneView = ARSCNView() | |
// MARK: - Lifecycle | |
override func loadView() { | |
super.loadView() | |
view = sceneView | |
// Create a session configuration | |
let configuration = ARWorldTrackingConfiguration() | |
// We want to receive the frames from the video | |
sceneView.session.delegate = self | |
// Run the session with the configuration | |
sceneView.session.run(configuration) | |
} | |
// MARK: - ARSessionDelegate | |
func session(_ session: ARSession, didUpdate frame: ARFrame) { | |
// This is where we will analyse our frame | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment