Exemplo n.º 1
0
        private void numPosZ_TextChanged(object sender, EventArgs e)
        {
            if (_updating)
            {
                return;
            }

            if (_targetVertices != null)
            {
                _mainWindow.VertexChange(_targetVertices);
                if (_targetVertices.Count == 1)
                {
                    TargetVertex._weightedPosition._z = numPosZ.Value;
                    TargetVertex.Unweight();
                }
                else
                {
                    foreach (Vertex3 v in _targetVertices)
                    {
                        v._weightedPosition._z += numPosZ.Value - numPosZ._previousValue;
                        v.Unweight();
                    }
                }
                _mainWindow.VertexChange(_targetVertices);
                _mainWindow.UpdateModel();
            }
        }
Exemplo n.º 2
0
        private void numPosY_TextChanged(object sender, EventArgs e)
        {
            if (_updating)
            {
                return;
            }

            if (_targetVertices != null)
            {
                if (_targetVertices.Count == 1)
                {
                    TargetVertex._weightedPosition._y = numPosY.Value;
                    TargetVertex.Unweight();
                }
                else
                {
                    foreach (Vertex3 v in _targetVertices)
                    {
                        v._weightedPosition._y += numPosY.Value;
                        v.Unweight();
                    }
                    numPosY.Value = 0;
                }
                _mainWindow.UpdateModel();
            }
        }