Exemplo n.º 1
0
 public static void Store(PlanarSolid2d solid, BinaryWriter writer)
 {
     Store(solid.Outer, writer);
     writer.Write(solid.Holes.Count);
     for (int i = 0; i < solid.Holes.Count; ++i)
     {
         Store(solid.Holes[i], writer);
     }
 }
Exemplo n.º 2
0
        public static void Restore(PlanarSolid2d solid, BinaryReader reader)
        {
            IParametricCurve2d outer;

            Restore(out outer, reader);
            solid.SetOuter(outer, true); // !! currently CW/CCW is ignored!

            int hole_count = reader.ReadInt32();

            for (int i = 0; i < hole_count; ++i)
            {
                IParametricCurve2d hole;
                Restore(out hole, reader);
                solid.AddHole(hole);
            }
        }