コード例 #1
0
        public DynamicMesh Clone()
        {
            DynamicMesh clone = new DynamicMesh();

            clone._Vertices = new List <Vector3>(_Vertices);
            clone._Indicies = new List <int>(_Indicies);
            clone._Texture  = new List <Vector2>(_Texture);

            return(clone);
        }
コード例 #2
0
        //Combine with other mesh
        public void Add(DynamicMesh ohterMesh)
        {
            if (ohterMesh == null)
            {
                return;
            }
            int size = _Vertices.Count;

            _Vertices.AddRange(ohterMesh._Vertices);
            _Texture.AddRange(ohterMesh._Texture);

            //add Indicies
            _Indicies.Capacity = _Indicies.Count + ohterMesh._Indicies.Count;
            foreach (int i in ohterMesh._Indicies)
            {
                _Indicies.Add(i + size);
            }
        }