diff --git a/app/src/main/java/com/google/ar/sceneform/samples/hellosceneform/MyArFragment.java b/app/src/main/java/com/google/ar/sceneform/samples/hellosceneform/MyArFragment.java new file mode 100644 index 0000000..b8ec794 --- /dev/null +++ b/app/src/main/java/com/google/ar/sceneform/samples/hellosceneform/MyArFragment.java @@ -0,0 +1,25 @@ +package com.google.ar.sceneform.samples.hellosceneform; + +import com.google.ar.core.Camera; +import com.google.ar.core.Pose; +import com.google.ar.sceneform.FrameTime; +import com.google.ar.sceneform.math.Quaternion; +import com.google.ar.sceneform.math.Vector3; +import com.google.ar.sceneform.ux.ArFragment; + +public class MyArFragment extends ArFragment { + public void onUpdate(FrameTime frameTime) { + super.onUpdate(frameTime); + Camera camera = this.getArSceneView().getArFrame().getCamera(); + com.google.ar.sceneform.Camera camera2 = this.getArSceneView().getScene().getCamera(); + + camera.getProjectionMatrix(camera2.getProjectionMatrix().data, 0, camera2.getFarClipPlane(), camera2.getFarClipPlane()); + camera.getViewMatrix(camera2.getViewMatrix().data, 0); + Pose var2; + Vector3 var3 = a.a(var2 = camera.getDisplayOrientedPose()); + Quaternion var4 = a.b(var2); + + System.out.println(var3); + System.out.println(var4); + } +}