Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ARKitに入門して🍣三昧/arsushi_with_arkit_20170721
Search
fromkk
July 21, 2017
Programming
3
1.1k
ARKitに入門して🍣三昧/arsushi_with_arkit_20170721
Presentation for iOS Creators' Meetup vol.4
fromkk
July 21, 2017
Tweet
Share
More Decks by fromkk
See All by fromkk
note社の全員野球で品質向上活動について / note_qa_challenge #iOS_test_teatime
fromkk
3
1.8k
1年分のデータが見たいと言われてやったこと/yearly_data_with_note
fromkk
0
890
note iOSチームの自動化 ver.2021/automation_with_iOS_team_on_note_ver2021
fromkk
0
1.9k
Bitrise体験会説明資料/bitrise_explore
fromkk
1
1k
noteのiOSアプリで実装したアクセシビリティの全て #iosdc #a /a11y_with_iOS_App_on_note
fromkk
2
3.4k
dSYMのアップロードで SPMを活用する/use_spm_with_upload_dsyms
fromkk
1
2.6k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
520
note社でのMagic Pod活用事例 #af_iosdc/magicpod_with_note
fromkk
2
10k
iOSには無いmacOS独自機能をCatalystで実装する #iosdc #d/make_macos_apps_with_catalyst
fromkk
9
2k
Other Decks in Programming
See All in Programming
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
900
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Outline View in SwiftUI
1024jp
1
330
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Better Code Design in PHP
afilina
PRO
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
920
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
Ruby is Unlike a Banana
tanoku
97
11k
How STYLIGHT went responsive
nonsquared
95
5.2k
Building Adaptive Systems
keathley
38
2.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
4 Signs Your Business is Dying
shpigford
180
21k
Rails Girls Zürich Keynote
gr2m
94
13k
Transcript
ARKitʹೖͯ͠!ࡾດ iOS Creators' Meetup vol.4 1
Profile Kazuya Ueoka Timers inc.ͷiOSΤϯδχΞ Twitter: @fromkk Github: fromkk Qiita:
fromkk 2
WWDC 2017Ͱൃද͞ΕͨARKit 602 Introducing ARKit: Augmented Reality for iOS 3
AR(Augmented Reality) 4 ֦ுݱ࣮ 4 Χϝϥ!ͰࡱӨͨ͠ө૾ʹ3DͷମΛஔ͢ΔࣄͰݱ࣮ ʹԾతͳମ͕͍Δ༷ʹݟ͑Δٕज़ 4
ͲΜͳࣄ͕ग़དྷΔ ͔ 4 Made with ARKit 4 Awesome ARKit 5
ͲΜͳΞϓϦʹ͍͍ͯΔ͔ 4 ήʔϜ 4 ECͷൢ 4 ڭҭɾֶशܥ and more... 6
ARKit 4 ϋΠϨϕϧͳAPI 4 iOSରԠ(A9Ҏ্) 4 SceneKit(3D), SpriteKit(2D), Metal(ΧελϜϨϯμϦ ϯά)ରԠ
4 ԿԯͷσόΠε͕ARKitʹରԠࡁΈ 7
ओཁͳػೳ 4 ϫʔϧυτϥοΩϯάʢಛΛτϥοΩϯάʣ 4 γʔϯͷཧղʢচͷஅɾͨΓఆɾ໌Δ͞ਪଌʣ 4 ϨϯμϦϯά UnityɾUnrealରԠ 8
Architecture 9
ARSession ARKitͷجຊͱͳΔΫϥε 4 func run(_ configuration: ARSessionConfiguration, options: RunOptions =
[]) 4 ఆظతʹτϥοΩϯάใΛؚΜͩ ARFrame Λ ARSessinoDelegate Ͱड͚औΔࣄ͕ग़དྷΔ 10
ARWorldTrackingSessionConfiguration ݱ࣮ੈքΛτϥοΩϯά͢ΔҝͷઃఆΫϥε 4 class var isSupported: Bool ͰτϥοΩϯάʹରԠ͠ ͍ͯΔ͔அ͢Δࣄ͕ग़དྷΔ 4
var planeDetection: PlaneDetection 4 struct PlaneDetection : OptionSet { static var horizontal: PlaneDetection } 11
ARSCNView ARΛදࣔ͢Δҝʹར༻͢ΔView 4 SCNView Λܧঝ 4 delegate: ARSCNViewDelegate Ͱ ARAnchor
͕Ճ͞Ε ͨͷ௨Λड͚औΔࣄ͕ग़དྷΔ 12
ͨΓఆ ARSCNView.hitTest(_ point: CGPoint, types: .ResultType) -> [ARHitTestResult] 13
ARHitTestResult.ResultType 4 featurePoint ࠷͍ۙಛ 4 estimatedHorizontalPlane ਪఆͷਫฏ໘ 4 existingPlane طଘͷฏ໘ΞϯΧʔ
4 existingPlaneUsingExtent طଘͷฏ໘ΞϯΧʔͷൣғΛ ར༻͢Δ 14
ͱ͜ΖͰ 15
օ͞Μ!͖Ͱ͔͢ʁ 16
Ͱ͢ΑͶʁ 17
!͕ແݶʹݱΕΔ༷ͳੈքʹಌΕ·͢ΑͶ" 18
࡞ͬͯΈ·͠ΐ͏! 19
؆୯ͳྲྀΕ 4 ARSCNView ʹ SCNScene ΛՃ͢Δ 4 ARSession ͷ run
ϝυουʹ ARWorldTrackingSessionConfiguration Ληοτ 4 scene.rootNode ʹ SCNNode ΛՃ͍ͯ͘͠ 4 ී௨ʹ UIGestureRecognizer ͕ར༻ग़དྷΔ 20
લఏ݅ 4 ΧϝϥΛར༻͢Δҝ Info.plist ʹ NSCameraUsageDescription Λهड़͓ͯ͘͠ 21
demo 22
Recap 4 ؆୯ʹݱ࣮ੈքʹण࢘Λେྔʹஔ͢Δࣄ͕ग़དྷ·ͨ͠! 4 SceneKit ͷ͕ࣝ͋Ε৭ʑग़དྷͦ͏" 4 iOS 11ͷϦϦʔεͱڞʹͲͷ༷ͳARKitରԠͷΞϓϦ͕ग़ͯ ͘Δָ͔͠ΈͰ͢Ͷ❗
4 (ͪͳΈʹ)iPadͷSwift Playground 2(beta)Ͱಈ͘$ 23
Sample code 4 https://github.com/fromkk/ARSushi 4 https://github.com/fromkk/ ARKitForSwiftPlayground2 24
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠! 25