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
0
160
swift arkit
mcz9mm
August 27, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
2.3k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1.1k
ゆるく学ぶARKit
mcz9mm
3
1.5k
What’s TCP/UDP?
mcz9mm
0
110
NATサーバーの必要性
mcz9mm
0
110
What’s New in ARKit2.0
mcz9mm
0
110
徳丸本 ログインフォーム
mcz9mm
0
110
arkit+animoji
mcz9mm
0
72
徳丸本8
mcz9mm
0
130
Other Decks in Technology
See All in Technology
ユニットテストに対する考え方の変遷 / Everyone should watch his live coding
mdstoy
0
120
How to achieve interoperable digital identity across Asian countries
fujie
0
110
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
20k
AWSにおけるTrend Vision Oneの効果について
shimak
0
120
いまさら聞けない ABテスト入門
skmr2348
1
200
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
250
GopherCon Tour 概略
logica0419
2
190
ACA でMAGI システムを社内で展開しようとした話
mappie_kochi
1
250
Why Governance Matters: The Key to Reducing Risk Without Slowing Down
sarahjwells
0
110
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
210
DataOpsNight#8_Terragruntを用いたスケーラブルなSnowflakeインフラ管理
roki18d
1
340
神回のメカニズムと再現方法/Mechanisms and Playbook for Kamikai scrumat2025
moriyuya
4
520
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Making Projects Easy
brettharned
119
6.4k
The Invisible Side of Design
smashingmag
301
51k
Faster Mobile Websites
deanohume
310
31k
Become a Pro
speakerdeck
PRO
29
5.5k
Docker and Python
trallard
46
3.6k
Rails Girls Zürich Keynote
gr2m
95
14k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
Raft: Consensus for Rubyists
vanstee
139
7.1k
How to Think Like a Performance Engineer
csswizardry
27
2k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Cult of Friendly URLs
andyhume
79
6.6k
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্ʹද͍ࣔͯ͠ΔαΠζͰඇৗʹେ͖ͳαΠζʹͳͬͯ͠ ·͏ͷͰҙ