use of au.gov.asd.tac.constellation.graph.interaction.plugins.select.FreeformSelectionPlugin in project constellation by constellation-app.
the class DefaultInteractionEventHandler method performFreeformSelection.
/**
* Performs a selection based on a given polygon in the freeformModel.
*
* @param appendSelection whether or not the selection will be appended to
* the current selection
* @param toggleSelection whether or not the selection will toggle the
* current selection. Note that if appendSelection is true, this parameter
* has no effect.
*/
private void performFreeformSelection(final GraphReadMethods rg, final boolean appendSelection, final boolean toggleSelection) {
final float[] boxCameraCoordinates = visualInteraction.windowBoxToCameraBox(freeformModel.getLeftMost(), freeformModel.getRightMost(), freeformModel.getTopMost(), freeformModel.getBottomMost());
freeformModel.setWindowBoxToCameraBox(boxCameraCoordinates);
final Float[] transformedVertices = freeformModel.getTransformedVertices();
final Plugin plugin = new FreeformSelectionPlugin(appendSelection, toggleSelection, VisualGraphUtilities.getCamera(rg), boxCameraCoordinates, transformedVertices, freeformModel.getNumPoints());
PluginExecution.withPlugin(plugin).executeLater(graph);
}
Aggregations