예제 #1
0
        private static ColoredPolygonMesh CreateMesh(int numvertices, int numpolygons, string rest)
        {
            FixedList<string> rows = new FixedList<string>(Q.Lines(rest));
              FixedList<string> vertexData = rows.Sublist(1, numvertices);
              FixedList<string> polyData = rows.Sublist(numvertices + 1, numpolygons);
              FixedList<Vector3> vertices = ParseVertices(vertexData);
              FixedList<ColoredPolygon> polys = ParsePolygons(polyData, vertices);

              return new ColoredPolygonMesh(polys);
        }
예제 #2
0
 public void Sublist()
 {
     FixedList<int> list = new FixedList<int>(1, 2, 3, 4, 5);
       FixedList<int> sub = list.Sublist(2, 2);
       FixedList<int> expected = new FixedList<int>(3, 4);
       Assert.AreEqual(expected, sub);
 }