Ejemplo n.º 1
0
        public override void KeysEventPointedVertex()
        {
            var m = MeshMGMT;

            if (KeyCode.Delete.IsDown())
            {
                if (!EditorInputManager.Control)
                {
                    if (m.PointedUv.meshPoint.vertices.Count == 1)
                    {
                        if (!m.DeleteVertexHeal(MeshMGMT.PointedUv.meshPoint))
                        {
                            EditedMesh.DeleteUv(MeshMGMT.PointedUv);
                        }
                    }
                    else
                    {
                        while (m.PointedUv.meshPoint.vertices.Count > 1)
                        {
                            EditedMesh.MoveTriangle(m.PointedUv.meshPoint.vertices[1], m.PointedUv.meshPoint.vertices[0]);
                        }
                    }
                }
                else
                {
                    EditedMesh.DeleteUv(m.PointedUv);
                }

                EditedMesh.Dirty = true;
            }
        }