/// <summary> /// Create a anchor for the trackable object /// </summary> /// <param name="trackable">Instantiate a NRAnchor object which Update trackable pose every frame</param> /// <returns>NRAnchor</returns> public static NRAnchor Factory(NRTrackable trackable) { if (trackable == null) { return(null); } NRAnchor result; if (m_AnchorDict.TryGetValue(trackable.GetDataBaseIndex(), out result)) { return(result); } NRAnchor anchor = (new GameObject()).AddComponent <NRAnchor>(); anchor.gameObject.name = "Anchor"; anchor.Trackable = trackable; m_AnchorDict.Add(trackable.GetDataBaseIndex(), anchor); return(anchor); }
/// <summary> /// Creates an anchor attached to current trackable at given pose. /// </summary> internal NRAnchor CreateAnchor() { return(NRAnchor.Factory(this)); }
/// <summary> /// Creates an anchor attached to current trackable at given pose. /// </summary> public NRAnchor CreateAnchor() { return(NRAnchor.Factory(this)); }