コード例 #1
0
ファイル: Chunks.cs プロジェクト: chantsunman/sharpgl
        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);
            }
        }
コード例 #2
0
ファイル: Index.cs プロジェクト: chantsunman/sharpgl
 //    Constructors.
 public Index(Index index)
 {
     vertex = index.vertex; uv = index.uv;
 }