Package mgui.interfaces.shapes.mesh
Class VertexSelection
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.shapes.mesh.VertexSelection
- All Implemented Interfaces:
InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
public class VertexSelection extends AbstractInterfaceObject
Defines a selection of nodes for a shape object.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<java.lang.Boolean>
selected_nodes
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description VertexSelection(boolean[] selected)
VertexSelection(int n)
VertexSelection(java.util.ArrayList<java.lang.Boolean> selected)
-
Method Summary
Modifier and Type Method Description void
clear()
void
deselect(int i)
void
deselect(java.util.ArrayList<java.lang.Integer> indices)
VertexSelection
getIntersection(VertexSelection selection)
Returns a new selection which is the intersection of this object andselection
.int
getSelectedCount()
Returns the count of selected verticesVertexSelection
getUnion(VertexSelection selection)
Returns a new selection which is the union of this object andselection
.boolean
isSelected(int i)
void
select(int i)
void
select(java.util.List<java.lang.Integer> indices)
void
set(int index, boolean selected)
void
set(VertexSelection selection)
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getName, getTreeLabel, isDestroyed, issueTreeNode, setName, setTreeNode, updateTreeNodes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
selected_nodes
protected java.util.ArrayList<java.lang.Boolean> selected_nodes
-
-
Constructor Details
-
VertexSelection
public VertexSelection(int n) -
VertexSelection
public VertexSelection(java.util.ArrayList<java.lang.Boolean> selected) -
VertexSelection
public VertexSelection(boolean[] selected)
-
-
Method Details
-
isSelected
public boolean isSelected(int i) -
select
public void select(int i) -
select
public void select(java.util.List<java.lang.Integer> indices) -
deselect
public void deselect(int i) -
deselect
public void deselect(java.util.ArrayList<java.lang.Integer> indices) -
clear
public void clear() -
set
public void set(int index, boolean selected) -
getIntersection
Returns a new selection which is the intersection of this object andselection
.- Parameters:
selection
-- Returns:
-
getUnion
Returns a new selection which is the union of this object andselection
.- Parameters:
selection
-- Returns:
-
set
-
getSelectedCount
public int getSelectedCount()Returns the count of selected vertices- Returns:
-