private void toolStripButton6_Click(object sender, EventArgs e) { int tWidth = TerrainGlobals.getTerrain().getNumXVerts(); int tHeight = TerrainGlobals.getTerrain().getNumZVerts(); DAGMask resMask = canvasForm.execute(tWidth, tHeight); if (resMask == null) { MessageBox.Show("There was an error computing output"); return; } Masking.clearSelectionMask(); for (int x = 0; x < tWidth; x++) { for (int y = 0; y < tHeight; y++) { float k = resMask[x, y]; Masking.addSelectedVert(x, y, k); } } Masking.rebuildVisualsAfterSelection(); resMask = null; }
public void apply() { Masking.clearSelectionMask(); mMask.loadAndExecute(); long index; float value; mMask.ResetIterator(); while (mMask.MoveNext(out index, out value)) { Masking.addSelectedVert(index, value); } Masking.rebuildVisualsAfterSelection(); }