Esempio n. 1
0
    protected Data.Motion loadStdMotion(string fileName)
    {
        Data.Motion  motion = new Data.Motion();
        StreamReader sr     = File.OpenText(fileName);
        string       line;

        while ((line = sr.ReadLine()) != null)
        {
            string[] tags = line.Split(' ');
            motion.readTags(tags);
        }
        motion.preprocess();
        return(motion);
    }
Esempio n. 2
0
    protected Data.Motion loadCaliMotion(string fileName, string motionName, int id)
    {
        Data.Motion  motion = new Data.Motion();
        StreamReader sr     = File.OpenText(fileName);
        string       line;

        while ((line = sr.ReadLine()) != null)
        {
            string[] tags = line.Split(' ');
            if (tags[0] == motionName && int.Parse(tags[1]) == id)
            {
                motion.readTags(tags, 2);
            }
        }
        motion.preprocess();
        return(motion);
    }