示例#1
0
        protected PrimitiveBuilder(MeshBuilder <TMaterial, TvG, TvM, TvS> mesh, PrimitiveBuilder <TMaterial, TvG, TvM, TvS> other, TMaterial material)
        {
            Guard.NotNull(mesh, nameof(mesh));
            Guard.NotNull(other, nameof(other));

            this._Mesh     = mesh;
            this._Material = material != null ? material : other.Material;
            other._Vertices.CopyTo(this._Vertices);

            foreach (var otherMT in other._MorphTargets)
            {
                var thisMT = new PrimitiveMorphTargetBuilder <TvG>(idx => this._Vertices[idx].Geometry, otherMT);
                this._MorphTargets.Add(otherMT);
            }
        }
 internal PrimitiveMorphTargetBuilder(Func <int, TvG> baseVertexFunc, PrimitiveMorphTargetBuilder <TvG> other)
 {
     this._BaseVertexFunc = baseVertexFunc;
     this._MorphVertices  = new Dictionary <int, TvG>(other._MorphVertices);
 }