Exemple #1
0
        override public SceneObject Duplicate()
        {
            DMeshSO copy     = new DMeshSO();
            DMesh3  copyMesh = new DMesh3(mesh);

            copy.Create(copyMesh, this.GetAssignedSOMaterial());
            copy.SetLocalFrame(
                this.GetLocalFrame(CoordSpace.ObjectCoords), CoordSpace.ObjectCoords);
            copy.SetLocalScale(this.GetLocalScale());
            return(copy);
        }
Exemple #2
0
        /// <summary>
        /// called internally by Duplicate() and DuplicateSubtype(),
        /// override to add things you want to duplicate
        /// </summary>
        protected virtual void duplicate_to(DMeshSO copy)
        {
            DMesh3 copyMesh = new DMesh3(mesh);

            copy.Create(copyMesh, this.GetAssignedSOMaterial());
            copy.SetLocalFrame(
                this.GetLocalFrame(CoordSpace.ObjectCoords), CoordSpace.ObjectCoords);
            copy.SetLocalScale(this.GetLocalScale());
            copy.enable_shadows = this.enable_shadows;
            copy.enable_spatial = this.enable_spatial;
        }