public Matrix4x4 getUnityMarkerMatrix(int i_id) { Matrix4x4 buf = new Matrix4x4(); NyARUnityUtil.ToCameraViewRH(base.getMarkerMatrix(i_id), 1, ref buf); return(buf); }
/// <summary> /// Sets marker matrix to unity transform /// </summary> /// <param name='i_id'> /// I_id. /// </param> /// <param name='i_t'> /// I_t. /// </param> public void setMarkerTransform(int i_id, Transform i_t) { Vector3 p = new Vector3(); Quaternion r = new Quaternion(); NyARUnityUtil.ToCameraViewRH(this.getMarkerMatrix(i_id), 1, ref p, ref r); i_t.localPosition = p; i_t.localRotation = r; }
/// <summary> /// Gets the Unity form marker matrix. /// </summary> /// <returns> /// The marker matrix. /// </returns> /// <param name='i_id'> /// I_id. /// </param> /// <param name='i_buf'> /// I_buf. /// </param> public void getMarkerMatrix(int i_id, ref Matrix4x4 i_buf) { NyARUnityUtil.ToCameraViewRH(base.getMarkerMatrix(i_id), 1, ref i_buf); }
/// <summary> /// Gets the unity marker transform rotation and position. /// </summary> /// <param name='i_id'> /// I_id. /// </param> /// <param name='o_pos'> /// O_pos. /// </param> /// <param name='o_rotation'> /// O_rotation. /// </param> public void getMarkerTransform(int i_id, ref Vector3 o_pos, ref Quaternion o_rotation) { NyARUnityUtil.ToCameraViewRH(this.getMarkerMatrix(i_id), 1, ref o_pos, ref o_rotation); }