$30 off During Our Annual Pro Sale. View Details »
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
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
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
1
530
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
160
Thoughts and experiences on Rust and TypeScript
unvalley
2
200
新規学習のハードルを下げる方法とは?/ How to Make Learning Something New Easier?
nobuoooo
1
130
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
150
最新TCAキャッチアップ
0si43
0
250
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
370
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
110
DevTools extensions で 独自の DevTool を開発する | FlutterKaigi 2024
kokiyoshida
0
320
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
6.1k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.5k
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
11
2.4k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
480
Happy Clients
brianwarren
98
6.7k
Side Projects
sachag
452
42k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
0
70
How GitHub (no longer) Works
holman
310
140k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
What's new in Ruby 2.0
geeforr
343
31k
Gamification - CAS2011
davidbonilla
80
5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Cost Of JavaScript in 2023
addyosmani
45
6.9k
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