Package mgui.interfaces.shapes
Class VectorSet3DInt
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.shapes.InterfaceShape
mgui.interfaces.shapes.Shape3DInt
mgui.interfaces.shapes.VectorSet3DInt
- All Implemented Interfaces:
java.awt.datatransfer.Transferable
,java.lang.Comparable<InterfaceShape>
,AttributeListener
,AttributeObject
,InterfaceObject
,PersistentObject
,VariableObject
,PopupMenuObject
,NamedObject
,InterfaceQueryObject
,InterfaceShapeQueryObject
,VertexDataColumnListener
,InterfaceTransferable
,TreeObject
,CleanableObject
,XMLObject
,IconObject
,org.jogamp.java3d.GeometryUpdater
public class VectorSet3DInt extends Shape3DInt
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.interfaces.shapes.Shape3DInt
Shape3DInt.VertexShapeTransformer
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.HashMap<java.lang.String,java.lang.Integer>
data_sizes
protected org.jogamp.java3d.Appearance
edge_appearance
protected org.jogamp.java3d.Appearance
fill_appearance
protected org.jogamp.java3d.BranchGroup
scene_group
java.util.ArrayList<Vector3DInt>
vectors
Fields inherited from class mgui.interfaces.shapes.Shape3DInt
boundBox, boundBoxNode, bounds_group, bounds_shape, boundSphere, centerPt, children2D, creatable_scene_node, drawEngine2D, group_node, has_3d_node, hasCameraListener, idStr, nodeListener, parent2D, scene3DObject, sceneNode, selected_vertices_group, shape_group, shape3d, vertex_shape_transformer, vertices_group
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
Constructors Constructor Description VectorSet3DInt()
VectorSet3DInt(java.lang.String name)
-
Method Summary
Modifier and Type Method Description void
addVector(Vector3D vector)
void
addVector(Vector3D vector, boolean updateShape, boolean updateListeners)
void
addVector(Shape3DInt thisShape, boolean updateShape, boolean updateListeners)
boolean
addVertexData(java.lang.String key, java.util.ArrayList<MguiNumber> data, NameMap map)
Adds vertex-wise data to this shape.void
attributeUpdated(AttributeEvent e)
Responds to an update in one of this shape's attributes.float
getArrowScale()
java.util.ArrayList<java.util.ArrayList<MguiNumber>>
getDataForVector(int index)
java.util.ArrayList<MguiNumber>
getDataForVector(java.lang.String key, int index)
protected Shape2DInt
getShape2D(Plane3D plane, float above_dist, float below_dist)
To be overridden by subclasses implementing a 2D representationboolean
getShowLabels()
int
getSize()
float
getStartPtScale()
java.util.ArrayList<Vector3DInt>
getVectors()
protected void
init()
boolean
needsRedraw3D(Attribute a)
protected void
setEdgeAppearance()
protected void
setFillAppearance()
protected void
setIcon()
void
setScene3DObject(boolean make_live)
Sets this ShapeInt's Java3D scene node from its current geometry and rendering attributes.java.lang.String
toString()
protected void
updateArrowScale()
protected void
updateChildren2D(Attribute a)
Updates an attribute of this shape's 2D children.void
updateShape()
Updates the geometric bounds of this ShapeInt.protected void
updateStartPtScale()
Methods inherited from class mgui.interfaces.shapes.Shape3DInt
addShape2DChild, clear2DChildren, contains, copyAttributes, crossesPlane, deregisterCameraListener, destroy, draw2D, drawShape2D, drawShape2D, drawShape2D, fireChildren2D, fireChildren2DModified, fireShapeListeners, fireShapeModified, geometryChanged, getAlpha, getBoundBox, getBoundBoxNode, getBoundSphere, getCameraListener, getCenterOfGravity, getClosestVertex, getDimensions, getDTD, getFullName, getGeometricCenter, getGeometry, getGeometryInstance, getIcon, getInheritingAttribute, getLabelColour, getLabelFont, getLabelScale, getLineColour, getLineStyle, getLocalName, getModifiedAttribute, getParent2D, getParentAttribute, getPopupMenu, getPopupMenuLength, getProximity, getScene3DObject, getScene3DObject, getShape, getShape2D, getShape2DInt, getShape2DInt, getShapeSceneNode, getShapeSceneNode, getShortXML, getTransferData, getTransferDataFlavors, getTreeLabel, getVertex, getVertexAppearance, getVertexColour, getVertexColour, getVertexCount, getVertexScale, getVertexScale, getVertexSelection, getVertices, handlePopupEvent, hasAlpha, hasAlpha, hasCameraListener, hasParentShape, isDataFlavorSupported, isHeritableAttribute, isInheritingAttribute, isLive, issueTreeNode, needsRedraw, performTransfer, registerCameraListener, releaseScene3DChildren, removeShape2DChild, setAlpha, setBoundBoxNode, setCreatableSceneNode, setCurrentColumn, setGeometry, setGraphic3DPopupMenu, setLabelColour, setLabelFont, setLabelScale, setLineStyle, setLive, setParent2D, setScene3DObject, setSelectedVertices, setShape, setShapeSceneNode, setShowSelectedVertices, setVertexSelection, showPopupMenu, showVertices, showVertices, updateData, updateSelectedVertices, updateVertices
Methods inherited from class mgui.interfaces.shapes.InterfaceShape
_init, addDataLink, addShapeListener, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, addVertexData, cleanTreeNodes, compareTo, finalizeAfterXML, fromVariable, getAllVertexData, getAttribute, getAttributes, getAttributeValue, getByReferenceUrls, getColourMap, getColourMap, getConstraint, getConstraints, getCurrentColumn, getCurrentDataColumn, getCurrentVertexData, getDataLink, getDataMax, getDataMin, getDatumAtVertex, getDatumAtVertex, getDefaultColourMap, getFileLoader, getFileWriter, getID, getInheritedAttribute, getInheritedAttributes, getInheritedAttributeValue, getLastColumnAdded, getLastColumnChanged, getLastColumnRemoved, getLegalName, getLinkedVertexData, getLinkedVertexDatum, getLoaderOptions, getModel, getName, getNameMap, getNameMap, getNonLinkedDataColumns, getObjectIcon, getParentSet, getPopupMenu, getSourceURL, getUnit, getUrlReference, getVariables, getVariableType, getVariableValue, getVariableValues, getVertexData, getVertexData, getVertexDataColumn, getVertexDataColumnCount, getVertexDataColumnNames, getVertexDataColumns, getVertexDataMap, getWriterOptions, getXML, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, hasAttribute, hasColumn, hasData, inheritAttributesFromParent, isAuxiliaryShape, isAuxiliaryShape, isDestroyed, isDrawable, isImageShape, isLegalName, isLight, isSelectable, isVisible, newVertexData, queryObject, queryShapeAtVertex, register, removeColourMap, removeDataLink, removeNameMap, removeShapeListener, removeVertexData, renameVertexDataColumn, setAttribute, setAttributes, setColourMap, setColourMap, setConstraint, setCurrentColumn, setDataMax, setDataMax, setDataMax, setDataMin, setDataMin, setDataMin, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDatumAtVertex, setDefaultColourMap, setDefaultColourMap, setFileLoader, setFileLoader, setFileWriter, setID, setLoaderOptions, setName, setNameMap, setOverride, setParentSet, setSelectable, setTreeNode, setUnit, setUrlReference, setVariableValues, setVariableValues, setVertexData, setVertexData, setVertexData, setVertexDataMap, setVisible, setWriterOptions, setXMLRoot, show2D, show2D, show3D, show3D, showData, showData, supportsVariableType, toVariable, unsetOverride, updateDataColumns, vertexDataColumnChanged, vertexDataColumnColourMapChanged, writeXML, writeXML, writeXML
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, updateTreeNodes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.interfaces.util.CleanableObject
clean
-
Field Details
-
scene_group
protected org.jogamp.java3d.BranchGroup scene_group -
fill_appearance
protected org.jogamp.java3d.Appearance fill_appearance -
edge_appearance
protected org.jogamp.java3d.Appearance edge_appearance -
vectors
-
data_sizes
public java.util.HashMap<java.lang.String,java.lang.Integer> data_sizes
-
-
Constructor Details
-
VectorSet3DInt
public VectorSet3DInt() -
VectorSet3DInt
public VectorSet3DInt(java.lang.String name)
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classShape3DInt
-
setIcon
protected void setIcon()- Overrides:
setIcon
in classShape3DInt
-
getVectors
-
attributeUpdated
Description copied from class:Shape3DInt
Responds to an update in one of this shape's attributes.Subclasses should override and call this super method AFTER handling the attribute change appropriately. Subclasses should also override needsRedraw() to indicate whether the scene node should be regenerated.
- Specified by:
attributeUpdated
in interfaceAttributeListener
- Overrides:
attributeUpdated
in classShape3DInt
- Parameters:
e
- anAttributeEvent
specifying which attribute has been changed
-
getArrowScale
public float getArrowScale() -
getStartPtScale
public float getStartPtScale() -
updateArrowScale
protected void updateArrowScale() -
updateStartPtScale
protected void updateStartPtScale() -
updateChildren2D
Description copied from class:Shape3DInt
Updates an attribute of this shape's 2D children.- Overrides:
updateChildren2D
in classShape3DInt
-
addVector
-
addVector
-
addVector
-
addVertexData
public boolean addVertexData(java.lang.String key, java.util.ArrayList<MguiNumber> data, NameMap map)Description copied from class:InterfaceShape
Adds vertex-wise data to this shape.- Overrides:
addVertexData
in classInterfaceShape
- Parameters:
key
- The key by which this column is to be referreddata
- The values for this columnmap
- Name map [optionally null] associating integer keys to names- Returns:
-
getDataForVector
-
getDataForVector
-
getShowLabels
public boolean getShowLabels() -
getShape2D
Description copied from class:Shape3DInt
To be overridden by subclasses implementing a 2D representation- Overrides:
getShape2D
in classShape3DInt
- Parameters:
plane
- Plane on which to renderabove_dist
- Distance above plane within which to project a shapebelow_dist
- Distance below plane within which to project a shape- Returns:
-
getSize
public int getSize() -
setScene3DObject
public void setScene3DObject(boolean make_live)Description copied from class:Shape3DInt
Sets this ShapeInt's Java3D scene node from its current geometry and rendering attributes. This node should be retrieved using theShape3DInt.getShapeSceneNode()
method. A scene node will only created if one of these conditions is met:- The shape is auxiliary (i.e., not a model shape, but a helper shape such as a section polygon)
- The shape is associated with a ShapeModel3D, and this model is live (is associated with at least one Java3D scene graph).
- Overrides:
setScene3DObject
in classShape3DInt
-
needsRedraw3D
-
setFillAppearance
protected void setFillAppearance() -
setEdgeAppearance
protected void setEdgeAppearance() -
updateShape
public void updateShape()Description copied from class:Shape3DInt
Updates the geometric bounds of this ShapeInt. Does not callShape3DInt.setScene3DObject()
.- Overrides:
updateShape
in classShape3DInt
-
toString
public java.lang.String toString()- Overrides:
toString
in classShape3DInt
-