ModelViewer.Renderer.IndexList.IndexList C# (CSharp) Méthode

IndexList() public méthode

public IndexList ( StreamChunk indexStream ) : System.Collections.Generic
indexStream StreamChunk
Résultat System.Collections.Generic
        public IndexList(StreamChunk indexStream)
        {
            this.indices = new short[indexStream.VertexCount];
            this.used = new bool[indexStream.VertexCount / 3];

            // Copy indices
            using (var ms = new System.IO.MemoryStream(indexStream.VertexData, false))
            using (var br = new System.IO.BinaryReader(ms))
            {
                for (var i = 0; i < indexStream.VertexCount; i++)
                {
                    indices[i] = br.ReadInt16();
                }
            }
        }