public int[][] Generate(bool document = true)
    {
        if (document)
        {
            //return GenerateWithDocumentation();
        }

        //Generates the GT for all the objects in the objectfolder
        int[][] grids = new int[_som.Count()][];
        for (int objectIndex = 0; objectIndex < _som.Count(); objectIndex++)
        {
            _som.PrepareStudyObject(objectIndex);
            _ogm.ClearGrid();
            RenderAllViews();

            int[] viewGrid  = _ogm.GetViewGrid();
            int[] pointGrid = _ogm.GetPointGrid();

            ReduceGrid(viewGrid, pointGrid);

            grids[objectIndex] = viewGrid;
        }
        _grids = grids;
        _ogm.ClearGrid();
        Debug.Log("Generated grids of " + _som.Count() + " objects");
        return(grids);
    }
Exemple #2
0
    private int EvaluateGrid()
    {
        //Counts how many of the grids voxels that corresponds with the GT
        int[] grid = _ogm.GetPointGrid();
        int[] gt   = _gtg._grids[_som.CurrentObject()];
        int   c    = 0;

        for (int i = 0; i < _ogm.gridCountCubed; i++)
        {
            if (grid[i] > 0 && gt[i] > 0)
            {
                c++;
            }
        }
        ;
        return(c);
    }