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
swift arkit
Search
mcz9mm
August 27, 2017
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
swift arkit
mcz9mm
August 27, 2017
More Decks by mcz9mm
See All by mcz9mm
自己満アプリから脱却するためにした UI改善とは
mcz9mm
1
1.2k
SwiftUI-List-Pagination
mcz9mm
2
2.4k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1.2k
ゆるく学ぶARKit
mcz9mm
3
1.5k
What’s New in ARKit2.0
mcz9mm
0
140
徳丸本 ログインフォーム
mcz9mm
0
130
arkit+animoji
mcz9mm
0
97
徳丸本8
mcz9mm
0
140
徳丸最終回
mcz9mm
0
100
Other Decks in Technology
See All in Technology
JavaScript 研修 (2026)
recruitengineers
PRO
2
630
2026-08-15 JAWS-UG 茨城 #16 Secrets ManagerにおけるSecret値の管理(Terraformの場合) / Secrets Manager Secrets
masasuzu
0
290
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
360
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9.2k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
280
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
760
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
160
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
860
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
現場回帰したデータエンジニアが考える AI 時代のキャリア開発 / Career Development in the Age of AI Perspectives from a Hands-on Data Engineer
medley
0
120
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
930
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
250
エンジニアに許された特別な時間の終わり
watany
108
250k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
530
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
490
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Mobile First: as difficult as doing things right
swwweet
225
10k
Agile that works and the tools we love
rasmusluckow
331
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Transcript
A R K I T S W I F T
S T U D Y
A J E N D A • ARKitͰͰ͖Δ͜ͱ • SceneViewͱͷؔΘΓ߹͍
• ݱ࣮ੈքͰͷ࠲ඪ • ݱ࣮ੈքͰͷεέʔϧ
ARKitͰͰ͖Δ͜ͱ • ϙδγϣϯτϥοΩϯά • ฏ໘ݕग़ • ݱ࣮ੈքͷ࠲ඪݕग़ • HitTest •
Etc..
SceneViewͱͷؔΘΓ߹͍ • 3D(Scenekit)ʴAR = ARSCNView ͷΑ͏ͳΠϝʔδ • ARͷಛͰ͋Δݱ࣮ੈքͰͷฏ໘ͷೝࣝͱɺ࠲ඪΛ༻͍ͯSceneViewʹNode(ς ΩετΦϒδΣΫτ)Λஔ͢Δ •
Χϝϥͷػೳͱಉ༷ʹsessionʹΑΓཧ͞Ε͓ͯΓɺsession͕ΕͨΓ͢Δͱೝ ͕ࣝͰ͖ͳ͘ͳΔ • AR্ۭؒʹஔ͢ΔΦϒδΣΫτجຊతʹSceneKitΛ༻͍ͯੜΛߦ͏
ݱ࣮ੈքͰͷ࠲ඪ • ARSceneViewͰhitTestΛߦ͏ hitTest: func hitTest(_ point: CGPoint, types: ARHitTestResult.ResultType)
-> [ARHitTestResult] • ARSceneViewͷը໘্ʹදࣔ͞Ε͍ͯΔը૾͕࣮ࡍʹݱ࣮ੈքͰͲͷϙΠϯτʹ ͨΔͷ͔ఆΛߦͬͯ͘ΕΔ • ͨͩɺೝࣝͨ͠ฏ໘ʹରͯ͠hitTestΛߦ͏ͷͰ·ͣೝࣝΛ͢Δඞཁ͕͋Δ • Returnʹೝࣝͨ͠ฏ໘ʹର͢Δ࠲ඪ͕݁Ռͱͯ͠ฦͬͯ͘Δ • SCNVector3ͱݺΕΔ̏࣍ݩͷ݁Ռͱͯ͠࠲ඪΛऔಘ͢Δ͜ͱ͕Ͱ͖Δ
SCNVector3 var x: Float The first component in the vector.
var y: Float The second component in the vector. var z: Float The third component in the vector. • ̎࣍ݩͰѻ͏ࡍX࣠ͱZ࣠ͷΈΛར༻͢Δͱྑ͍ Z X Y
ݱ࣮ੈքͰͷεέʔϧ • ࠲ඪͷεέʔϧશͯϝʔτϧࢉ͞Ε͍ͯΔ? // ശΛੜ let cube = SCNBox(width: 0.1,
height: 0.1, length: 0.1, chamferRadius: 0) let cubeNode = SCNNode(geometry: cube) • 0.1 ͩͱ ݱ࣮ੈքͰͷ10cm ʹ૬͢Δ • ͍ͭͷΑ͏ʹview্ʹද͍ࣔͯ͠ΔαΠζͰඇৗʹେ͖ͳαΠζʹͳͬͯ͠ ·͏ͷͰҙ