Пример #1
0
        public override bool MouseEventPointedLine()
        {
            if (EditorInputManager.GetMouseButton(0))
            {
                if (_mergeUnMerge)
                {
                    if (!EditorInputManager.Shift)
                    {
                        EditedMesh.AllVerticesShared(PointedLine);
                    }
                    else
                    {
                        Dirty |= PointedLine.GiveUniqueVerticesToTriangles();
                    }
                }
                else
                {
                    for (var i = 0; i < 2; i++)
                    {
                        Dirty |= PointedLine[i].SetSmoothNormal(!EditorInputManager.Shift);
                    }
                }
            }

            return(false);
        }
Пример #2
0
        public override bool Inspect()
        {
            var m = MeshMGMT;

            "OnClick:".write(60);
            if ((_mergeUnMerge ? "Merging (Shift: Unmerge)" : "Smoothing (Shift: Unsmoothing)").Click().nl())
            {
                _mergeUnMerge = !_mergeUnMerge;
            }

            if ("Sharp All".Click())
            {
                foreach (MeshPoint vr in EditedMesh.meshPoints)
                {
                    vr.smoothNormal = false;
                }
                EditedMesh.Dirty      = true;
                Cfg.newVerticesSmooth = false;
            }

            if ("Smooth All".Click().nl())
            {
                foreach (var vr in EditedMesh.meshPoints)
                {
                    vr.smoothNormal = true;
                }
                EditedMesh.Dirty      = true;
                Cfg.newVerticesSmooth = true;
            }


            if ("All shared".Click())
            {
                EditedMesh.AllVerticesShared();
                EditedMesh.Dirty      = true;
                Cfg.newVerticesUnique = false;
            }

            if ("All unique".Click().nl())
            {
                foreach (var t in EditedMesh.triangles)
                {
                    EditedMesh.GiveTriangleUniqueVertices(t);
                }
                Cfg.newVerticesUnique = true;
            }



            return(false);
        }