コード例 #1
0
ファイル: LineSynchronizer.cs プロジェクト: rdilts1/4dforvive
    public static void Write(this BinaryWriter writer, makeLine.Line l)
    {
        writer.Write(l.points.Count);

        foreach (var p in l.points)
        {
            writer.Write(p);
        }
    }
コード例 #2
0
    public static makeLine.Line ReadLine(this BinaryReader reader)
    {
        var countPoints = reader.ReadInt32();

        var l = new makeLine.Line();

        var points = new List<makeLine.Point>();
        for(var i = 0; i < countPoints; i++) {
            var p = reader.ReadPoint();
            p.parent = l;
            points.Add(p);
        }

        l.points = points;
        l.opacity = 1f;
        return l;
    }
コード例 #3
0
ファイル: LineSynchronizer.cs プロジェクト: rdilts1/4dforvive
    public static makeLine.Line ReadLine(this BinaryReader reader)
    {
        var countPoints = reader.ReadInt32();

        var l = new makeLine.Line();

        var points = new List <makeLine.Point>();

        for (var i = 0; i < countPoints; i++)
        {
            var p = reader.ReadPoint();
            p.parent = l;
            points.Add(p);
        }

        l.points  = points;
        l.opacity = 1f;
        return(l);
    }