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.9k
1年分のデータが見たいと言われてやったこと/yearly_data_with_note
fromkk
0
980
note iOSチームの自動化 ver.2021/automation_with_iOS_team_on_note_ver2021
fromkk
0
2k
Bitrise体験会説明資料/bitrise_explore
fromkk
1
1.1k
noteのiOSアプリで実装したアクセシビリティの全て #iosdc #a /a11y_with_iOS_App_on_note
fromkk
2
4k
dSYMのアップロードで SPMを活用する/use_spm_with_upload_dsyms
fromkk
1
3k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
600
note社でのMagic Pod活用事例 #af_iosdc/magicpod_with_note
fromkk
2
11k
iOSには無いmacOS独自機能をCatalystで実装する #iosdc #d/make_macos_apps_with_catalyst
fromkk
9
2.1k
Other Decks in Programming
See All in Programming
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
180
Rancher と Terraform
fufuhu
2
550
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
160
Ruby Parser progress report 2025
yui_knk
1
450
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
為你自己學 Python - 冷知識篇
eddie
1
350
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
320
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
Deep Dive into Kotlin Flow
jmatsu
1
350
はじめてのMaterial3 Expressive
ym223
2
750
チームのテスト力を鍛える
goyoki
3
290
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Featured
See All Featured
Balancing Empowerment & Direction
lara
3
620
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
KATA
mclloyd
32
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
Documentation Writing (for coders)
carmenintech
74
5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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