示例#1
0
        public void CopyTo(VertexList <T> dst)
        {
            for (int i = 0; i < this._Vertices.Count; ++i)
            {
                var v = this._Vertices[i];

                var idx = dst._Vertices.Count;
                dst._Vertices.Add(v);
                dst._VertexCache[new VertexKey(dst._Vertices, idx)] = idx;
            }
        }
示例#2
0
        public void TestVertexListDictionary()
        {
            var list = new VertexList <_VertexExample>();

            list.Use(5);
            Assert.AreEqual(1, list.Count);

            list.Use(7);
            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(5, list[0].Value);
            Assert.AreEqual(7, list[1].Value);

            list.Use(5);
            Assert.AreEqual(2, list.Count);
        }