Log in or register to post comments

Ground Plane at SceneKit swift

March 20, 2018 - 9:10am #1

Hi,

First all, I tried the sample from github VuforiaSampleSwift to migrate modelview matrix from Vuforia into Scenekit

https://github.com/yshrkt/VuforiaSampleSwift

https://qiita.com/akira108/items/a743138fca532ee193fe

But when I try to integrate the ground plane iOS sample, I stuck at how to do the transform and projection conversions from device pose and anchors into SceneKit.

What I want to do is:

1. To create SCNPlane object for reticle plane, so I need to calculate device pose from device tracker, and pass into SceneKit.

mDevicePoseMatrix = SampleApplicationUtils::Matrix44FTranspose(SampleApplicationUtils::Matrix44FInverse(modelViewMatrix));

2. To get modelview matrix from the anchor result, and pass 3d model position into SceneKit.

Vuforia::Matrix44F modelViewMatrix = Vuforia::Tool::convertPose2GLMatrix(result->getPose());

How can I do ? I only can pass info into one SCNCamera, but I need setup 3d models inside SCNScene can be related to multiple anchors and device pose with reticle plane.

Thanks,

Felix

 

Log in or register to post comments