Useful code in Swift for SceneKit