Class AbstractDisplayLayer3D

java.lang.Object
repast.simphony.visualization.visualization3D.AbstractDisplayLayer3D
All Implemented Interfaces:
IDisplayLayer<VisualItem3D>, IDisplayLayer3D
Direct Known Subclasses:
DisplayLayer3D, NetworkDisplayLayer3D

public abstract class AbstractDisplayLayer3D extends Object implements IDisplayLayer3D
Author:
Nick Collier
  • Field Details

  • Constructor Details

    • AbstractDisplayLayer3D

      public AbstractDisplayLayer3D(Style3D style, org.jogamp.java3d.Group topGroup)
  • Method Details

    • addObject

      public void addObject(Object obj)
      Description copied from interface: IDisplayLayer
      Adds the specified object to the layer.
      Specified by:
      addObject in interface IDisplayLayer<VisualItem3D>
      Parameters:
      obj - the object to add
    • removeObject

      public void removeObject(Object obj)
      Description copied from interface: IDisplayLayer
      Removes the specified objecdt from the layer.
      Specified by:
      removeObject in interface IDisplayLayer<VisualItem3D>
      Parameters:
      obj - the object to remove
    • createItemsForAddedObjects

      protected abstract void createItemsForAddedObjects(Layout layout, boolean doLayout)
    • removeItemsForRemovedObjects

      protected void removeItemsForRemovedObjects()
    • getVisualItem

      public VisualItem3D getVisualItem(Object obj)
      Description copied from interface: IDisplayLayer
      Gets the visual representation of this object.
      Specified by:
      getVisualItem in interface IDisplayLayer<VisualItem3D>
      Parameters:
      obj - the object whose visual representation we want to get
      Returns:
      the visual representation of this object.
    • findObjsForItem

      public Object findObjsForItem(org.jogamp.java3d.Shape3D shape)
      Given a Shape3D, return the object that the shape is the visualization of.
      Specified by:
      findObjsForItem in interface IDisplayLayer3D
      Parameters:
      shape - the shape whose associated object we want to find
      Returns:
      the object that the specified shape represents
    • doUpdate

      protected abstract void doUpdate(Layout layout, boolean layoutPerformed)
    • createLabel

      protected abstract Label createLabel()
    • update

      public void update(LayoutUpdater updater)
      Description copied from interface: IDisplayLayer
      Updates the layout, styles etc. of the displayed objects.
      Specified by:
      update in interface IDisplayLayer<VisualItem3D>
      Parameters:
      updater - used to update the layout and position information
    • setStyle

      public void setStyle(Style3D style)
    • applyUpdates

      public void applyUpdates()
      Apply the updates to the scene graph. This should be called by the 3D behavior in display3D.
      Specified by:
      applyUpdates in interface IDisplayLayer<VisualItem3D>