Example #1
0
        internal Model(
            string teamspace,
            string modelId,
            string revisionId,
            ModelSettings settings,
            Dictionary <string, SuperMeshInfo> superMeshes,
            Vector3 offset,
            RepoWebClientInterface repoHttpClient)
        {
            this.teamspace      = teamspace;
            this.modelId        = modelId;
            this.revisionId     = revisionId;
            this.superMeshes    = superMeshes;
            this.offset         = offset;
            this.repoHttpClient = repoHttpClient;

            root = new GameObject(teamspace + "." + modelId);
            foreach (var smesh in superMeshes)
            {
                smesh.Value.gameObj.transform.parent = root.transform;
            }

            units          = settings.properties.unit;
            angleFromNorth = settings.angleFromNorth;


            if (hasSurveyPoints = (settings.surveyPoints != null && settings.surveyPoints.Length > 0))
            {
                surveyPoint = new Vector3(settings.surveyPoints[0].position[0], settings.surveyPoints[0].position[1], settings.surveyPoints[0].position[2]);
                latLong     = new Vector2(settings.surveyPoints[0].latLong[0], settings.surveyPoints[0].latLong[1]);
            }

            name = settings.name;
        }
Example #2
0
 /**
  * RepoClient constructor.
  * This instantiates the interfacing layer between the Unity Game and 3D Repo Web Services
  */
 public RepoClient()
 {
     client       = new RepoWebClientInterface();
     modelManager = new ModelManager(client);
 }