Ejemplo n.º 1
0
        public override void ReadData(Scene scene, BinaryReader stream)
        {
            //	Note: A max face is three indices and
            //	a flag short.

            //	Read number of faces.
            short faceCount = 0;
            faceCount = stream.ReadInt16();

            //	Read each face and add it.
            for (short i = 0; i < faceCount; i++)
            {
                Face f = new Face();
                Index index = new Index(stream.ReadInt16());
                f.Indices.Add(index);
                index = new Index(stream.ReadInt16());
                f.Indices.Add(index);
                index = new Index(stream.ReadInt16());
                f.Indices.Add(index);
                stream.ReadInt16();
                faces.Add(f);
            }
        }
Ejemplo n.º 2
0
 //    Constructors.
 public Index(Index index)
 {
     vertex = index.vertex; uv = index.uv;
 }