7 using System.Collections.Generic;
10 using System.Runtime.InteropServices;
20 private float[] glPoseMatrix =
new float[16];
21 private byte[] idBytes =
new byte[100];
22 private byte[] nameBytes =
new byte[100];
33 Array.Clear(idBytes, 0, idBytes.Length);
35 if (Application.platform == RuntimePlatform.IPhonePlayer)
44 return Encoding.UTF8.GetString(idBytes).TrimEnd(
'\0');
52 Array.Clear(nameBytes, 0, nameBytes.Length);
54 if (Application.platform == RuntimePlatform.IPhonePlayer)
63 return Encoding.UTF8.GetString(nameBytes).TrimEnd(
'\0');
70 if (Application.platform == RuntimePlatform.IPhonePlayer)
90 return Matrix4x4.identity;
94 Matrix4x4 tempPose = MatrixUtils.GetUnityPoseMatrix(glPoseMatrix);
95 Quaternion rotation = Quaternion.Euler(90, 0, 0);
96 Matrix4x4 m = Matrix4x4.TRS(Camera.main.transform.position, rotation,
new Vector3(1, 1, 1));
99 tempPose = m * tempPose;
101 rotation = Quaternion.Euler(-90, 0, 0);
102 m = Matrix4x4.TRS(Vector3.zero, rotation,
new Vector3(1, 1, 1));
105 tempPose = tempPose * m;
113 internal Matrix4x4 GetTargetPose()
115 if (Application.platform == RuntimePlatform.IPhonePlayer)
121 NativeSharedAPI.Trackable_getPose(cPtr, glPoseMatrix);
124 return MatrixUtils.GetUnityPoseMatrix(glPoseMatrix);
WorldCenterMode
The world center mode defines what is the center in game view. If camera is world center then trackab...
WorldCenterMode WorldCenterModeSetting
Get world center mode value
Initialize system environment with app key, screen size and orientation
Container for individual tracking information