public void Add3DAsset(ResourceActivationContext ctxt, IVisualMarker marker, string mediaId, AssetInstance assetInstance, string fallbackImageUrl = null, Layout layout = null, Action onOpen = null, Action onSelect = null) { if (!CheckAdapter()) { return; } if (DoesObjectExist(marker.GetIdentifier(), mediaId)) { return; } var markerAsset = new MarkerAsset { ActivationContext = ctxt, AssetInstance = assetInstance, Marker = marker, MediaType = MediaType.Image, MediaUrl = fallbackImageUrl, MediaLayout = layout, ObjectId = mediaId, OnSelect = onSelect, OnOpen = onOpen }; Add3DAsset(markerAsset); }
public void AddMarkerImage(ResourceActivationContext ctxt, IVisualMarker marker, string mediaId, string url, Layout layout = null, Action onOpen = null, Action onSelect = null) { if (!CheckAdapter()) { return; } if (DoesObjectExist(marker.GetIdentifier(), mediaId)) { return; } var markerMedia = new MarkerMedia { ActivationContext = ctxt, Marker = marker, MediaType = MediaType.Image, MediaUrl = url, MediaLayout = layout, ObjectId = mediaId, OnSelect = onSelect, OnOpen = onOpen }; AddMarkerMedia(markerMedia); }
/// <summary> /// Checks if the given marker is tracking /// </summary> /// <param name="marker"></param> /// <returns></returns> public bool IsTracking(IVisualMarker marker) { if (!CheckAdapter()) { return(false); } m_logger.Debug("Is tracking {0}, IsActive={1}", marker.GetIdentifier(), IsActive); Adapter.RegisterMarker(marker); if (IsActive) { return(m_trackingMarkerObjects.GetCount(marker.GetIdentifier()) > 0); } return(false); }