public void SetupCloud()
 {
     if (!FileReader.isActive)
     {
         FileReader.readFile(FileLocation);
     }
 }
Exemple #2
0
 void processFiles(string path)
 {
     try
     {
         if (path.EndsWith(".txt"))
         {
             FileReader = new VoxTree_SetupFiles();
             startedJob = true;
             FileReader.readFile(path);
         }
     }
     catch (Exception e)
     {
         Debug.Log("You don't get the point do you...");
         Debug.LogError(e.Message);
     }
 }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        //pointCloud = new VoxTreeData();
        setupFileReader = new VoxTree_SetupFiles();
        //Debug.Log("Current path: " + Directory.GetCurrentDirectory());
        importFilePath = Path.Combine(Directory.GetCurrentDirectory(), AssetDatabase.GetAssetPath(ClassifiedClouds[0]));
        importFilePath = importFilePath.Replace("/", "\\");
        exportFilePath = Path.Combine(Directory.GetCurrentDirectory(), folderExport, Path.GetFileNameWithoutExtension(importFilePath));

        if (!Directory.Exists(exportFilePath))
        {
            Directory.CreateDirectory(exportFilePath);
        }
        text.text = "Importing CSV from:\t" + importFilePath;
        Debug.Log("Importing CSV from:\t " + importFilePath);
        text.text = "\nExporting Files to:\t" + exportFilePath;
        Debug.Log("Exporting Files to:\t " + importFilePath);

        // TODO:
        // Have checksum file.
        // nFiles; first file name/size; last file name/size; random file name/size
        // Also cloud info.
        // nVoxels; Header info; date of construction; date of access

        if (Directory.GetFiles(exportFilePath).Length > 1)
        {
            Debug.Log(string.Format("{0} Files found in directory.", Directory.GetFiles(exportFilePath).Length));
            hasVoxTreeFiles = true;
        }
        else
        {
            hasVoxTreeFiles = false;
        }

        if (forceVoxTreeFilesSetup)
        {
            hasVoxTreeFiles = false;
        }

        if (!hasVoxTreeFiles)
        {
            setupFileReader.readFile(importFilePath);
        }
    }