Example #1
0
        public static TexturingInfo FromStream(BinaryReader br)
        {
            var result = new TexturingInfo();

            var cnt = br.ReadInt32();

            result.Points = new HeadPoints <HeadPoint>();
            for (var i = 0; i < cnt; i++)
            {
                result.Points.Add(HeadPoint.FromStream(br));
            }

            cnt = br.ReadInt32();
            if (cnt != 0)
            {
                result.TexCoords = new Vector2[cnt];
                for (var i = 0; i < cnt; i++)
                {
                    var v = new Vector2(br.ReadSingle(), br.ReadSingle());
                    result.TexCoords[i] = v;
                }
            }

            cnt            = br.ReadInt32();
            result.Indices = new int[cnt];
            for (var i = 0; i < cnt; i++)
            {
                result.Indices[i] = br.ReadInt32();
            }

            return(result);
        }
Example #2
0
        public virtual HeadPoint Clone()
        {
            var newPoint = new HeadPoint(Value)
            {
                Visible  = Visible,
                Selected = Selected
            };

            newPoint.LinkedPoints.AddRange(LinkedPoints);
            return(newPoint);
        }
Example #3
0
        public static HeadPoint FromStream(BinaryReader br)
        {
            var result = new HeadPoint(br.ReadSingle(), br.ReadSingle());

            result.Visible = br.ReadBoolean();

            var cnt = br.ReadInt32();

            for (var i = 0; i < cnt; i++)
            {
                result.LinkedPoints.Add(br.ReadInt32());
            }

            return(result);
        }