Example #1
0
 public override OpStatus Apply()
 {
     Target.EditAndUpdateMesh(
         (mesh) => {
         MeshTransforms.Scale(mesh, LocalScale.x, LocalScale.y, LocalScale.z);
         Target.SetLocalScale(Vector3f.One);
     },
         GeometryEditTypes.VertexDeformation
         );
     return(OpStatus.Success);
 }
Example #2
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);
        }
Example #3
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;
        }