Package mgui.morph.sections
Class MorphSections3DInt
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.shapes.InterfaceShape
mgui.interfaces.shapes.Shape3DInt
mgui.interfaces.shapes.SectionSet3DInt
mgui.morph.sections.MorphSections3DInt
- All Implemented Interfaces:
java.awt.datatransfer.Transferable,java.lang.Comparable<InterfaceShape>,AttributeListener,AttributeObject,InterfaceView3DObject,InterfaceObject,PersistentObject,VariableObject,PopupMenuObject,NamedObject,InterfaceQueryObject,InterfaceShapeQueryObject,ShapeSet,ShapeListener,VertexDataColumnListener,InterfaceTransferable,TreeObject,CleanableObject,XMLObject,IconObject,org.jogamp.java3d.GeometryUpdater
public class MorphSections3DInt extends SectionSet3DInt
Class representing a set of intermediate sections (subsections), such that each
subsection holds an iterative morphing representation from some source shape to
some target shape.
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.interfaces.shapes.Shape3DInt
Shape3DInt.VertexShapeTransformerNested classes/interfaces inherited from class mgui.interfaces.shapes.InterfaceShape
InterfaceShape.VertexDataSetNested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType -
Field Summary
Fields Modifier and Type Field Description booleanisNextSectionbooleanisPrevSectionintiterationsSectionSet3DIntparentSetAttributeListshapeAttrFields inherited from class mgui.interfaces.shapes.SectionSet3DInt
blnUpdate, boundBox2D, clip_planes, scene3DNodes, sections, widthFields 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_groupFields 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_dirFields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes -
Constructor Summary
Constructors Constructor Description MorphSections3DInt()MorphSections3DInt(SectionSet3DInt parent, int iter) -
Method Summary
Modifier and Type Method Description voidaddShape2D(Shape2DInt thisShape, int section, int subsection)voidaddShape2D(Shape2DInt thisShape, int section, int subsection, boolean update)intgetCurrentSection()intgetCurrentSubsection()intgetFirstSection()SectionSet3DIntgetInitSectionSet()java.util.IteratorgetIterator()intgetLastSection()ShapeSet2DIntgetNextSubSection()doublegetSectionDist(int i)Gets the distance of the section plane at indexifrom the reference plance (i.e., at index 0).ShapeSet2DIntgetShapeSet(int keyVal)ShapeSet2DIntgetShapeSet(int keyVal, double sectionWidth)Return a ShapeSet2DInt of all objects intersected by the current section plane and its upper and lower bounds.intgetSubSection(int i)Adds shapes from morph section set newSections to corresponding sections in this set.floatgetSubSectionDist(int subSect)booleanhasSection(int i)Checks whether a section exists at indexi.protected voidinit()voiditerateSubsection()voidresetSections()voidsetCurrentSubsection(int i)voidsetFromSectionSet(SectionSet3DInt thisSet)voidsetParent(SectionSet3DInt parent, int iter)java.lang.StringtoString()Methods inherited from class mgui.interfaces.shapes.SectionSet3DInt
addSection, addShape, addShape2D, addShape2D, addUnionSet, addUnionSet, addUnionSet, attributeUpdated, crossesPlane, get2DShapes, get2DShapes, getApplyClip, getBoundBox2D, getClipDistDown, getClipDistUp, getClipPlanes, getClosestSection, getGeometryInstance, getIndexOf, getInvertClip, getLastAdded, getLastInsert, getLastInserted, getLastModified, getLastMoved, getLastRemoved, getLocalName, getMembers, getPlaneAt, getRefPlane, getScene3DObject, getSectionForShape, getSectionOf, getShape2D, getShape2DInt, getShape2DType, getShape2DType, getShapeCount, getShapeSet, getShapeSet3DInt, getShapeSet3DInt, getShowSection3D, getSize, getSpacing, getSubSets, getUpdateable, getVertices, getView3D, getView3D, getXML, hasClipPlanes, hasSections, hasShape, hasShape, isAncestorSet, issueTreeNode, moveShapeBefore, needsRedraw, removeSection, removeSelectionSet, removeShape, removeShape, setApplyClip, setBoundBox2D, setClipDistDown, setClipDistUp, setIcon, setInvertClip, setRefPlane, setScene3DObject, setScene3DObject, setScene3DObject, setSpacing, setTreeNode, setUnit, setUpdateable, shapeUpdated, updateLightShapes, updateShape, updateShape, validateNodes, writeXMLMethods inherited from class mgui.interfaces.shapes.Shape3DInt
addShape2DChild, clear2DChildren, contains, copyAttributes, deregisterCameraListener, destroy, draw2D, drawShape2D, drawShape2D, drawShape2D, fireChildren2D, fireChildren2DModified, fireShapeListeners, fireShapeModified, geometryChanged, getAlpha, getBoundBox, getBoundBoxNode, getBoundSphere, getCameraListener, getCenterOfGravity, getClosestVertex, getDimensions, getDTD, getFullName, getGeometricCenter, getGeometry, getIcon, getInheritingAttribute, getLabelColour, getLabelFont, getLabelScale, getLineColour, getLineStyle, getModifiedAttribute, getParent2D, getParentAttribute, getPopupMenu, getPopupMenuLength, getProximity, getScene3DObject, getShape, getShape2D, getShape2DInt, getShapeSceneNode, getShapeSceneNode, getShortXML, getTransferData, getTransferDataFlavors, getTreeLabel, getVertex, getVertexAppearance, getVertexColour, getVertexColour, getVertexCount, getVertexScale, getVertexScale, getVertexSelection, handlePopupEvent, hasAlpha, hasAlpha, hasCameraListener, hasParentShape, isDataFlavorSupported, isHeritableAttribute, isInheritingAttribute, isLive, performTransfer, registerCameraListener, releaseScene3DChildren, removeShape2DChild, setAlpha, setBoundBoxNode, setCreatableSceneNode, setCurrentColumn, setGeometry, setGraphic3DPopupMenu, setLabelColour, setLabelFont, setLabelScale, setLineStyle, setLive, setParent2D, setSelectedVertices, setShape, setShapeSceneNode, setShowSelectedVertices, setVertexSelection, showPopupMenu, showVertices, showVertices, updateChildren2D, updateData, updateSelectedVertices, updateVerticesMethods inherited from class mgui.interfaces.shapes.InterfaceShape
_init, addDataLink, addShapeListener, addVertexData, 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, 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, setUrlReference, setVariableValues, setVariableValues, setVertexData, setVertexData, setVertexData, setVertexDataMap, setVisible, setWriterOptions, setXMLRoot, show2D, show2D, show3D, show3D, showData, showData, supportsVariableType, toVariable, unsetOverride, updateDataColumns, vertexDataColumnChanged, vertexDataColumnColourMapChanged, writeXML, writeXMLMethods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, updateTreeNodesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface mgui.interfaces.util.CleanableObject
cleanMethods inherited from interface mgui.interfaces.NamedObject
getName, setNameMethods inherited from interface mgui.interfaces.shapes.util.ShapeListener
destroy, isDestroyedMethods inherited from interface mgui.interfaces.shapes.ShapeSet
getFullName, getModel, getUnit, isSelectable, isVisible, show2D, show3D
-
Field Details
-
iterations
public int iterations -
parentSet
-
isNextSection
public boolean isNextSection -
isPrevSection
public boolean isPrevSection -
shapeAttr
-
-
Constructor Details
-
MorphSections3DInt
public MorphSections3DInt() -
MorphSections3DInt
-
-
Method Details
-
init
protected void init()- Overrides:
initin classSectionSet3DInt
-
setParent
-
getShapeSet
- Overrides:
getShapeSetin classSectionSet3DInt
-
getShapeSet
Description copied from class:SectionSet3DIntReturn a ShapeSet2DInt of all objects intersected by the current section plane and its upper and lower bounds.- Overrides:
getShapeSetin classSectionSet3DInt- Returns:
-
getCurrentSubsection
public int getCurrentSubsection() -
hasSection
public boolean hasSection(int i)Description copied from class:SectionSet3DIntChecks whether a section exists at indexi.- Overrides:
hasSectionin classSectionSet3DInt- Returns:
-
getSectionDist
public double getSectionDist(int i)Description copied from class:SectionSet3DIntGets the distance of the section plane at indexifrom the reference plance (i.e., at index 0).- Overrides:
getSectionDistin classSectionSet3DInt- Returns:
-
getSubSectionDist
public float getSubSectionDist(int subSect) -
setCurrentSubsection
public void setCurrentSubsection(int i) -
iterateSubsection
public void iterateSubsection() -
addShape2D
-
addShape2D
-
toString
public java.lang.String toString()- Overrides:
toStringin classSectionSet3DInt
-
getSubSection
public int getSubSection(int i)Adds shapes from morph section set newSections to corresponding sections in this set.- Parameters:
newSections- MorphSections3DInt object to perform union with public void addUnionSet(MorphSections3DInt newSections){ int section; /**@TODO test for equality of reference plane and spacing? or.. adjust section values as a function of reference plane & spacing for (int i = 0; i < newSections.sectionSet.items.size(); i++){ section = newSections.sectionSet.items.get(i).keyValue; if (super.hasSection(section)) ((ShapeSet2DInt)sectionSet.getValue(section)). addUnionSet((ShapeSet2DInt)newSections.sectionSet.items.get(i).objValue); else { ShapeSet2DInt thisSect = new ShapeSet2DInt(); thisSect.idStr = name + "." + String.valueOf(section); sectionSet.addItem(section, thisSect); thisSect.addUnionSet((ShapeSet2DInt)newSections.sectionSet.items.get(i).objValue); thisSect.addShapeListener(this); } fireShapeListeners(); } } public BranchGroup getScene3DObject(){ return getScene3DObject(null); } public BranchGroup getScene3DObject(ShapeSelectionSet selSet){ //get ShapeSet3DInt scene groups for each section BranchGroup retGroup = new BranchGroup(); //add subsections float dist; ShapeSet2DInt thisSet2D; ShapeSet3DInt thisSet3D; BranchGroup thisGroup; for (int i = 0; i < sectionSet.items.size(); i++){ dist = getSubSectionDist(getSubSection(sectionSet.items.get(i).keyValue)); thisSet2D = (ShapeSet2DInt)sectionSet.items.get(i).objValue; thisSet3D = ShapeFunctions.getShapeSet3DFromSection((Plane3D)thisShape, dist, thisSet2D, selSet); thisGroup = thisSet3D.getScene3DObject(); if (thisGroup != null) retGroup.addChild(thisGroup); } //scene3DObject = retGroup; return retGroup; }
-
resetSections
public void resetSections() -
getFirstSection
public int getFirstSection()- Overrides:
getFirstSectionin classSectionSet3DInt
-
getLastSection
public int getLastSection()- Overrides:
getLastSectionin classSectionSet3DInt
-
getNextSubSection
-
getCurrentSection
public int getCurrentSection() -
setFromSectionSet
- Overrides:
setFromSectionSetin classSectionSet3DInt
-
getInitSectionSet
- Overrides:
getInitSectionSetin classSectionSet3DInt
-
getIterator
public java.util.Iterator getIterator()- Overrides:
getIteratorin classSectionSet3DInt
-