Exemplo n.º 1
0
    /// <summary>
    /// Imports browse artefact's mesh and texture, assigns object info
    /// </summary>
    /// <param name="browseIdentifiers">array of identifiers to browse</param>
    public void ImportArtefacts(string[] browseIdentifiers)
    {
        ResetInstances();
        importedObjects = new GameObject[browseIdentifiers.Length];

        progressBar.SetActive(true);
        ProgressBarCont.SetMaxVal(browseIdentifiers.Length * 2);


        for (int i = 0; i < browseIdentifiers.Length; i++)
        {
            string meshLocation = Paths.PathToFile(DublinCoreReader.GetMeshLocationForArtefactWithIdentifier(browseIdentifiers [i]));
            string texLocation  = Paths.PathToFile(DublinCoreReader.GetTextureLocationForArtefactWithIdentifier(browseIdentifiers [i]));

            StartCoroutine(ImportModel(i, browseIdentifiers[i], meshLocation, texLocation));
        }
    }
Exemplo n.º 2
0
    private void GetIdentifiers(string collectId)
    {
        collectionId = collectId;

        string[] collectionIdentifiers = CollectionReader.GetIdentifiersForArtefactsInCollectionWithIdentifier(collectId);
        importedObjects = new GameObject[collectionIdentifiers.Length];

        progressBar.SetActive(true);
        ProgressBarCont.SetMaxVal(collectionIdentifiers.Length * 2);

        for (int i = 0; i < collectionIdentifiers.Length; i++)
        {
            string meshLocation = Paths.PathToFile(DublinCoreReader.GetMeshLocationForArtefactWithIdentifier(collectionIdentifiers [i]));
            string texLocation  = Paths.PathToFile(DublinCoreReader.GetTextureLocationForArtefactWithIdentifier(collectionIdentifiers [i]));
            StartCoroutine(ImportModel(i, collectionIdentifiers[i], meshLocation, texLocation));
        }
    }
Exemplo n.º 3
0
 public void TestGetMeshLocationForArtefactWithIdentifier_Invalid()
 {
     string meshLocation = DublinCoreReader.GetMeshLocationForArtefactWithIdentifier("DOES NOT EXIST");
 }
Exemplo n.º 4
0
 public void TestGetMeshLocationForArtefactWithIdentifier_NoAssets()
 {
     string meshLocation = DublinCoreReader.GetMeshLocationForArtefactWithIdentifier("NoAssets");
 }
Exemplo n.º 5
0
    public void TestGetMeshLocationForArtefactWithIdentifier()
    {
        string meshLocation = DublinCoreReader.GetMeshLocationForArtefactWithIdentifier("TestMonk");

        Assert.That(meshLocation == "/VerticeArchive/TEST/Doog.obj");
    }