Пример #1
0
        static void Main(string[] args)
        {
            FilePaths filePaths = ArgParser.Parse(args);

            AssimpInterpreter interpreter = new AssimpInterpreter();

            Structure structure = interpreter.Interpret(filePaths.inFile);

            NodeGraph nodeGraph = null;

            // Voxel solution.
            if (filePaths.voxelSolution)
            {
                nodeGraph = VoxelGridGraphGenerator.GenerateNodeGraph(structure);
            }
            // Mesh solution.
            else
            {
                List <NodeGraph> nodeGraphs = new List <NodeGraph>();
                for (int i = 0; i < structure.components.Count; i++)
                {
                    NodeGraph n = ComponentGraphGenerator.GenerateComponentNodeGraph(structure.components[i]);
                    nodeGraphs.Add(n);
                }
                nodeGraph = GraphUnifier.UnifyGraphs(nodeGraphs);
            }

            XMLCreator.writeXML(nodeGraph, filePaths.outFile);
        }