public static float GetAngle(Vector3 firstVet, Vector3 centerVet, Vector3 endVet) { Vector3 fromVet = firstVet - centerVet; Vector3 toVet = endVet - centerVet; float angle = Vector3.Angle(fromVet, toVet); ARDebug.LogWarning("angles = " + angle); return(angle); }
public void ErrorInfo(string num, string msg) { _infoUI.SetActive(true); ARDebug.LogWarning("msg =" + msg + " error=" + num); if (num != null && msg != null) { _infoUI.transform.Find("Error").GetComponent <Text>().text = num + ": " + msg; } else { _infoUI.transform.Find("Error").GetComponent <Text>().text = "出错了!"; } }
public void ErrorInfo(string num, string msg) { _infoUI.SetActive(true); //string num = ARErrorInfo.Instance.errorNum; // string msg = ARErrorInfo.Instance.errorMsg; ARDebug.LogWarning("msg =" + msg + " error=" + num); if (num != null && msg != null) { _infoUI.transform.Find("Error").GetComponent <Text>().text = ShowInfo(num, msg); } else { _infoUI.transform.Find("Error").GetComponent <Text>().text = "出错了!"; } }
/** * \if english * @brief Get the list of trackables with specified filter. * @param[out] trackableList A list where the returned trackable stored. The previous values will be cleared. * @param filter Query filter. * \else * @brief 根据过滤器获取ARTrackable. * @param[out] trackableList 获取到的ARTrackable集合。该集合之前存储的值将被清除。 * @param filter 查询过滤器。 * \endif */ public static void GetTrackables <T>(List <T> trackableList, ARTrackableQueryFilter filter) where T : ARTrackable { if (trackableList == null) { ARDebug.LogWarning("GetTrackables test trackableList == null"); throw new ArgumentException(); } if (ARSessionManager.Instance.SessionStatus != ARSessionStatus.RUNNING && ARSessionManager.Instance.SessionStatus != ARSessionStatus.PAUSED) { trackableList.Clear(); ARDebug.LogWarning("GetTrackables test SessionStatus != ARSessionStatus.RUNNING"); return; } ARSessionManager.Instance.m_ndkSession.TrackableManager.GetTrackables <T>(trackableList, filter); }
public void BuildIfNeeded(out string error) { error = ""; if (!m_IsRawDataDirty) { return; } string cliBinaryPath; if (!FindCliBinaryPath(out cliBinaryPath)) { return; } if (m_ARAugImageDatabaseType == AREnginesType.HUAWEI_AR_ENGINE) { BuildHWDatabase(cliBinaryPath, out error); } else { ARDebug.LogWarning("Wrong AREngine Type" + m_ARAugImageDatabaseType); return; } m_IsRawDataDirty = false; EditorUtility.SetDirty(this); // Force a save to make certain build process will get updated asset. AssetDatabase.SaveAssets(); const int BYTES_IN_KBYTE = 1024; // TODO:: Remove this log when all errors/warnings are moved to stderr for CLI tool. ARDebug.LogInfo("Built AugmentedImageDatabase '{0}' ({1} Images, {2} KBytes)", name, m_Images.Count, m_RawData.Length / BYTES_IN_KBYTE); }