Пример #1
0
    // Use this for initialization
    void Start()
    {
        geoMarkers = new GeoMarkerList(minimumRadius, this.transform, earthTransform, earthRadius, prefab);

        Participant[] participants = ParticipantImporter.getParticipants();

        drawMarkers(participants, "yellow01", "male");
    }
Пример #2
0
    public GeoMarkerList MergeCoords()
    {
        GeoMarkerList newGeoMarkerList = new GeoMarkerList(radiusCheck, transform, earthTransform, earthRadius, markerPrefab);

        foreach (GeoMarker gmark in gmarkers)
        {
            newGeoMarkerList.CheckMarker(gmark);
        }

        return(newGeoMarkerList);
    }
Пример #3
0
    IEnumerator loadMarkers(Participant[] participants)
    {
        foreach (Participant element in participants)
        {
            latitude  = element.getLatitude();
            longitude = element.getLongitude();
            geoMarkers.CheckCoords(latitude, longitude);
            if (Time.frameCount % 50 == 0)
            {
                geoMarkers = geoMarkers.MergeCoords();
            }
            markerCount = geoMarkers.Count();
            //if (!(done1.Contains(latitude) && done2.Contains(longitude)))
            //{
            //done1.Add(latitude);
            //done2.Add(longitude);


            /*//Set position of marker
             * latitude = Mathf.PI * latitude / 180;
             * longitude = Mathf.PI * longitude / 180;
             *
             * // adjust position by radians
             * latitude -= 1.570795765134f; // subtract 90 degrees (in radians)
             *
             * // and switch z and y (since z is forward)
             * xPos = (radius + (prefab.transform.localScale.x / 2)) * Mathf.Sin(latitude) * Mathf.Cos(longitude);
             * zPos = (radius + (prefab.transform.localScale.x / 2)) * Mathf.Sin(latitude) * Mathf.Sin(longitude);
             * yPos = (radius + (prefab.transform.localScale.x / 2)) * Mathf.Cos(latitude);
             *
             * // move marker to position
             * markers.Add(Instantiate(prefab, new Vector3(xPos, yPos, zPos), Quaternion.identity));
             * markers[markerCount].transform.LookAt(transform);
             * markers[markerCount].transform.Rotate(270, 0, 0);
             * markers[markerCount].SetActive(true);
             * markerCount++;*/
            //}

            yield return(null);
        }
    }