Package mgui.interfaces.shapes
Class Mesh2DInt
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.shapes.InterfaceShape
mgui.interfaces.shapes.Shape2DInt
mgui.interfaces.shapes.Mesh2DInt
- All Implemented Interfaces:
java.awt.datatransfer.Transferable
,java.lang.Cloneable
,java.lang.Comparable<InterfaceShape>
,AttributeListener
,AttributeObject
,InterfaceObject
,PersistentObject
,VariableObject
,PopupMenuObject
,NamedObject
,InterfaceQueryObject
,InterfaceShapeQueryObject
,ShapeListener
,VertexDataColumnListener
,InterfaceTransferable
,TreeObject
,CleanableObject
,XMLObject
,IconObject
public class Mesh2DInt extends Shape2DInt
A 2D representation of a
Mesh3DInt
object. Allows references to vertices of the parent mesh.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.interfaces.shapes.InterfaceShape
InterfaceShape.VertexDataSet
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description java.util.ArrayList<Colour>
colours
java.util.ArrayList<org.jogamp.vecmath.Point2f[]>
edges
java.util.ArrayList<java.lang.Integer[]>
indices
Fields inherited from class mgui.interfaces.shapes.Shape2DInt
bounds, centerPt, child3D, drawEngine, idStr, map_idx_to_parent, nodeListener, parentShape, sceneNode, thisShape
Fields inherited from class mgui.interfaces.shapes.InterfaceShape
attributes, constraints, data_columns, icon, ID, is_auxiliary, is_registered, isDrawable, isImageShape, isLight, isOverridden, last_column_added, last_column_changed, last_column_removed, linked_colour_maps, loader_options, notifyListeners, overrideAttr, parent_set, selected_nodes, shapeListeners, vertex_data, writer_options, xml_current_column, xml_current_loader, xml_current_shape, xml_current_shape_options, xml_current_type, xml_current_url, xml_is_vertex_data, xml_root_dir
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addEdge(org.jogamp.vecmath.Point2f[] edge)
void
draw(java.awt.Graphics2D g, DrawingEngine d)
void
merge(Mesh2DInt mesh)
boolean
needsRedraw(Attribute<?> a)
Returnstrue
if a change toattribute
will require a redraw of this shape.void
setColours(java.util.ArrayList<Colour> c)
void
updateShape()
Methods inherited from class mgui.interfaces.shapes.Shape2DInt
addVertexData, addVertexData, addVertexData, addVertexData, attributeUpdated, clone, contains, destroy, destroy, drawShape2D, fireShapeListeners, getAllVertexData, getAlpha, getBounds, getBoundShape, getCenterPoint, getChild3D, getClosestVertex, getClosestVertex3D, getCurrentColumn, getCurrentVertexData, getDatumAtVertex, getDimensions, getDTD, getExtBounds, getGeometry, getGeometryInstance, getLabelColour, getLabelFont, getLabelScale, getLineColour, getLineStyle, getLinkedVertexData, getLinkedVertexDatum, getLocalName, getMapIdxToParent, getModifiedAttribute, getNonLinkedDataColumns, getParentAttribute, getParentShape, getPopupMenu, getPopupMenu, getProximity, getShape, getShape3D, getShape3DInt, getShape3DInt, getShortXML, getTransferData, getTransferDataFlavors, getTreeLabel, getVertex, getVertexColour, getVertexCount, getVertexData, getVertexDataColumn, getVertexDataColumnNames, getVertexDataColumns, getVertexDataMap, getVertexScale, getVertexSelection, getVertexShape, getVertices, getVisibility, handlePopupEvent, hasAlpha, hasAlpha, hasColumn, hasData, hasParentShape, isDataFlavorSupported, isHeritableAttribute, isInheritingAttribute, isLabelShape, issueTreeNode, performTransfer, printNodes, removeVertexData, setAlpha, setChild3D, setCurrentColumn, setCurrentColumn, setGeometry, setGraphic2DPopupMenu, setIcon, setLabelColour, setLabelFont, setLabelScale, setLineStyle, setMapIdxToParent, setParentShape, setShape, setTreeNode, setVertexDataMap, setVertexSelection, setVertexShape, shapeUpdated, showPopupMenu, showVertices, showVertices, toString, updateDataColumns, validateNodes, writeShapeToXML, writeXML
Methods inherited from class mgui.interfaces.shapes.InterfaceShape
_init, addDataLink, addShapeListener, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, cleanTreeNodes, compareTo, copyAttributes, finalizeAfterXML, fireShapeModified, fromVariable, getAttribute, getAttributes, getAttributeValue, getByReferenceUrls, getColourMap, getColourMap, getConstraint, getConstraints, getCurrentDataColumn, getDataLink, getDataMax, getDataMin, getDatumAtVertex, getDefaultColourMap, getFileLoader, getFileWriter, getFullName, getID, getInheritedAttribute, getInheritedAttributes, getInheritedAttributeValue, getLastColumnAdded, getLastColumnChanged, getLastColumnRemoved, getLegalName, getLoaderOptions, getModel, getName, getNameMap, getNameMap, getObjectIcon, getParentSet, getSourceURL, getUnit, getUrlReference, getVariables, getVariableType, getVariableValue, getVariableValues, getVertexData, getVertexDataColumnCount, getWriterOptions, getXML, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, hasAttribute, inheritAttributesFromParent, isAuxiliaryShape, isAuxiliaryShape, isDestroyed, isDrawable, isImageShape, isLegalName, isLight, isSelectable, isVisible, newVertexData, queryObject, queryShapeAtVertex, register, removeColourMap, removeDataLink, removeNameMap, removeShapeListener, renameVertexDataColumn, setAttribute, setAttributes, setColourMap, setColourMap, setConstraint, setDataMax, setDataMax, setDataMax, setDataMin, setDataMin, setDataMin, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDefaultColourMap, setDefaultColourMap, setFileLoader, setFileLoader, setFileWriter, setID, setLoaderOptions, setName, setNameMap, setOverride, setParentSet, setSelectable, setUnit, setUrlReference, setVariableValues, setVariableValues, setVertexData, setVertexData, setVertexData, setVisible, setWriterOptions, setXMLRoot, show2D, show2D, show3D, show3D, showData, showData, supportsVariableType, toVariable, unsetOverride, vertexDataColumnChanged, vertexDataColumnColourMapChanged, writeXML, writeXML
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, updateTreeNodes
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.interfaces.util.CleanableObject
clean
Methods inherited from interface mgui.interfaces.shapes.util.ShapeListener
isDestroyed
-
Field Details
-
edges
public java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges -
indices
public java.util.ArrayList<java.lang.Integer[]> indices -
colours
-
-
Constructor Details
-
Mesh2DInt
public Mesh2DInt() -
Mesh2DInt
public Mesh2DInt(java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges)Constructor for thisMesh2DInt
.- Parameters:
edges
- list of edges obtained from a parent mesh
-
Mesh2DInt
public Mesh2DInt(java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges, java.util.ArrayList<java.lang.Integer[]> indices)Constructor for thisMesh2DInt
.- Parameters:
edges
- list of edges obtained from a parent meshindices
- list of indices corresponding to the vertices of the parent mesh (can benull
)
-
-
Method Details
-
draw
- Overrides:
draw
in classShape2DInt
-
needsRedraw
Description copied from class:InterfaceShape
Returnstrue
if a change toattribute
will require a redraw of this shape.- Overrides:
needsRedraw
in classShape2DInt
- Returns:
-
setColours
-
merge
-
addEdge
public void addEdge(org.jogamp.vecmath.Point2f[] edge) -
updateShape
public void updateShape()- Overrides:
updateShape
in classShape2DInt
-