Ejemplo n.º 1
0
        /// <summary>
        /// Reads a robot file into a GopherField class from a path. Make sure you have defined the progress delegate.
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static GopherField ReadField(string path)
        {
            ProgressCallback("Loading file into memory...");
            var reader = new FieldReader(path);

            ProgressCallback("Pre-Processing loaded file...");
            reader.PreProcess();
            ProgressCallback("Pre-Processing STL meshes...");
            reader.PreProcessSTL();
            ProgressCallback("Processing Meshes...");
            reader.ProcessSTL();
            ProgressCallback("Processing Joints...");
            reader.ProcessJoints();
            ProgressCallback("Processing colliders...");
            reader.ProcessColliders();
            ProgressCallback("Generating node tree...");
            return(FieldNodeGenerator.FieldFactory(reader.Field));
        }