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
120
swift arkit
mcz9mm
August 27, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
2.1k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1k
ゆるく学ぶARKit
mcz9mm
3
1.4k
What’s TCP/UDP?
mcz9mm
0
98
NATサーバーの必要性
mcz9mm
0
84
What’s New in ARKit2.0
mcz9mm
0
80
徳丸本 ログインフォーム
mcz9mm
0
97
arkit+animoji
mcz9mm
0
64
徳丸本8
mcz9mm
0
110
Other Decks in Technology
See All in Technology
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
440
Lexical Analysis
shigashiyama
1
150
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
700
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
Featured
See All Featured
RailsConf 2023
tenderlove
29
900
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Code Reviewing Like a Champion
maltzj
520
39k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
For a Future-Friendly Web
brad_frost
175
9.4k
Practical Orchestrator
shlominoach
186
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Producing Creativity
orderedlist
PRO
341
39k
Building Your Own Lightsaber
phodgson
103
6.1k
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্ʹද͍ࣔͯ͠ΔαΠζͰඇৗʹେ͖ͳαΠζʹͳͬͯ͠ ·͏ͷͰҙ