Class 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.
Andrew Reid
  • Field Details

    • iterations

      public int iterations
    • parentSet

      public SectionSet3DInt parentSet
    • isNextSection

      public boolean isNextSection
    • isPrevSection

      public boolean isPrevSection
    • shapeAttr

      public AttributeList shapeAttr
  • Constructor Details

    • MorphSections3DInt

      public MorphSections3DInt()
    • MorphSections3DInt

      public MorphSections3DInt​(SectionSet3DInt parent, int iter)
  • Method Details

    • init

      protected void init()
      init in class SectionSet3DInt
    • setParent

      public void setParent​(SectionSet3DInt parent, int iter)
    • getShapeSet

      public ShapeSet2DInt getShapeSet​(int keyVal)
      getShapeSet in class SectionSet3DInt
    • getShapeSet

      public ShapeSet2DInt getShapeSet​(int keyVal, double sectionWidth)
      Description copied from class: SectionSet3DInt
      Return a ShapeSet2DInt of all objects intersected by the current section plane and its upper and lower bounds.
      getShapeSet in class SectionSet3DInt
    • getCurrentSubsection

      public int getCurrentSubsection()
    • hasSection

      public boolean hasSection​(int i)
      Description copied from class: SectionSet3DInt
      Checks whether a section exists at index i.
      hasSection in class SectionSet3DInt
    • getSectionDist

      public double getSectionDist​(int i)
      Description copied from class: SectionSet3DInt
      Gets the distance of the section plane at index i from the reference plance (i.e., at index 0).
      getSectionDist in class SectionSet3DInt
    • getSubSectionDist

      public float getSubSectionDist​(int subSect)
    • setCurrentSubsection

      public void setCurrentSubsection​(int i)
    • iterateSubsection

      public void iterateSubsection()
    • addShape2D

      public void addShape2D​(Shape2DInt thisShape, int section, int subsection)
    • addShape2D

      public void addShape2D​(Shape2DInt thisShape, int section, int subsection, boolean update)
    • toString

      public java.lang.String toString()
      toString in class SectionSet3DInt
    • getSubSection

      public int getSubSection​(int i)
      Adds shapes from morph section set newSections to corresponding sections in this set.
      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()
      getFirstSection in class SectionSet3DInt
    • getLastSection

      public int getLastSection()
      getLastSection in class SectionSet3DInt
    • getNextSubSection

      public ShapeSet2DInt getNextSubSection()
    • getCurrentSection

      public int getCurrentSection()
    • setFromSectionSet

      public void setFromSectionSet​(SectionSet3DInt thisSet)
      setFromSectionSet in class SectionSet3DInt
    • getInitSectionSet

      public SectionSet3DInt getInitSectionSet()
      getInitSectionSet in class SectionSet3DInt
    • getIterator

      public java.util.Iterator getIterator()
      getIterator in class SectionSet3DInt