Exemplo n.º 1
0
    public Arml CreateARMLElements(string prefab, string id, GeoLocation geo, float compass, float viewArc)
    {
        createdTrackables = new List <TrackableElement>();
        createdViewPoints = new List <ViewPointElement>();
        createdSectors    = new List <SectorElement>();
        createdFeatures   = new List <FeatureElement>();

        creationTrackable = new TrackableElement();
        creationSector    = new SectorElement();
        creationViewPoint = new ViewPointElement();
        creationFeature   = new FeatureElement();

        SetTrackableElement(id);
        SetSectorElement(id, creationTrackable, compass, viewArc);
        SetViePointElement(id, creationSector, geo);
        SetFeatureElement(id, creationTrackable, prefab);

        createdTrackables.Add(creationTrackable);
        createdSectors.Add(creationSector);
        createdViewPoints.Add(creationViewPoint);
        createdFeatures.Add(creationFeature);

        arml                       = new Arml();
        arml.aRElements            = new ARElements();
        arml.aRElements.Trackables = createdTrackables;
        arml.aRElements.Sectors    = createdSectors;
        arml.aRElements.ViewPoints = createdViewPoints;
        arml.aRElements.Features   = createdFeatures;

        createdArmls.Add(arml);

        return(arml);
    }
Exemplo n.º 2
0
    void SetViePointElement(string id, SectorElement sec, GeoLocation geo)
    {
        creationViewPoint.id        = id + "VP";
        creationViewPoint.name      = id + "VP";
        creationViewPoint.Point     = new PointElement();
        creationViewPoint.Point.pos = geo.latitude.ToString() + " " + geo.longitude.ToString();

        creationViewPoint.SectorLinks = new List <SectorLink>();
        SectorLink sectorLink = new SectorLink();

        sectorLink.href = "#" + sec.id;
        creationViewPoint.SectorLinks.Add(sectorLink);
    }
Exemplo n.º 3
0
        private string GetTrackableId(SectorElement se, List <TrackableElement> trackableElements)
        {
            string trackable = null;

            foreach (TrackableElement te in trackableElements)
            {
                if (se.TrackableLink.href.Substring(1).Equals(te.id))
                {
                    trackable = te.id;
                }
            }
            return(trackable);
        }