Getting Started with ARKit | Ray Wenderlich


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5168-getting-started-with-arkit

Hi Thanks for great tutorial , I have one question in Demo2 -> RoomViewController -> isAnyPlaneInView(line no 190) Why you have to do this ?. Don’t you think it is heavy task for 60FPS for loop in this method I mean You can store plane in global array when it is detected and update it when respective delegate method called.

REPLY

@accordionguy Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hello there! For the purposes of a live demo in a workshop, it’s often better to use a computationally more expensive method that’s easier to understand than one that doesn’t use so much processor power, but requires more explaining. That’s the trade-off I made for the demo. I also tested it on an iPhone 6S, the oldest phone capable of running ARKit apps, and the performance hit was small enough not to be noticeable.

There are probably a number of ways to optimize the demo apps; I’ve even come up with a couple myself. However, I’m going to have to leave their implementation as an exercise for the reader. I’d love to do an update article — maybe I should talk to the editors about that.