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
900
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.7k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
530
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
useSyncExternalStoreを使いまくる
ssssota
6
1.4k
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
290
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
360
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
980
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
php-conference-japan-2024
tasuku43
0
360
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
960
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
290
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
190
Go の GC の不得意な部分を克服したい
taiyow
3
850
Featured
See All Featured
BBQ
matthewcrist
85
9.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Practical Orchestrator
shlominoach
186
10k
Scaling GitHub
holman
459
140k
GitHub's CSS Performance
jonrohan
1031
460k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Side Projects
sachag
452
42k
YesSQL, Process and Tooling at Scale
rocio
170
14k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How STYLIGHT went responsive
nonsquared
96
5.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
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