All Implemented Interfaces:
WindowListener, EventListener, Renderer, ProjectionListener, IDisplay

public class Display3D extends AbstractDisplay3D
3D Display class based on J3D. Uses a behavior to update the display.
Author:
Nick Collier
  • Field Details

    • TRANSFORMS_APPLIED

      public static final int TRANSFORMS_APPLIED
      See Also:
    • defaultStyle

      protected Style3D defaultStyle
    • defaultEdgeStyle

      protected EdgeStyle3D defaultEdgeStyle
    • firstRender

      protected boolean firstRender
    • backgroundColor

      protected Color backgroundColor
    • pick

      protected org.jogamp.java3d.utils.pickfast.PickCanvas pick
    • canvas

      protected org.jogamp.java3d.exp.swing.JCanvas3D canvas
    • sceneRoot

      protected org.jogamp.java3d.BranchGroup sceneRoot
    • universe

      protected org.jogamp.java3d.utils.universe.SimpleUniverse universe
    • updater

      protected repast.simphony.visualization.visualization3D.Display3D.MainBehavior updater
    • topRotTransGroup

      protected org.jogamp.java3d.TransformGroup topRotTransGroup
    • projectionTransGroup

      protected org.jogamp.java3d.TransformGroup projectionTransGroup
    • valueLayerTransGroup

      protected org.jogamp.java3d.TransformGroup valueLayerTransGroup
    • updatedLastRender

      protected boolean updatedLastRender
  • Constructor Details

  • Method Details

    • init

      public void init()
      Description copied from interface: IDisplay
      Initializes the display. Called once before the display is made visible.
      Specified by:
      init in interface IDisplay
      Overrides:
      init in class AbstractDisplay3D
    • getCanvas

      public org.jogamp.java3d.exp.swing.JCanvas3D getCanvas()
      Specified by:
      getCanvas in class AbstractDisplay3D
    • getSceneRoot

      public org.jogamp.java3d.BranchGroup getSceneRoot()
    • probe

      public void probe(org.jogamp.java3d.Shape3D shape, org.jogamp.vecmath.Point3d intersectPoint)
      Given the shape3D, probe the object that it represents.
      Parameters:
      shape - the shape representing the object we want to probe
      intersectPoint - the intersection point of the pick itself
    • getVisualObject

      public VisualItem3D getVisualObject(Object obj)
    • createDisplayLayer

      protected AbstractDisplayLayer3D createDisplayLayer(Style3D style)
      Specified by:
      createDisplayLayer in class AbstractDisplay3D
    • createEdgeLayer

      public AbstractDisplayLayer3D createEdgeLayer(EdgeStyle3D style, Network network)
      Specified by:
      createEdgeLayer in class AbstractDisplay3D
    • createValueLayerDisplayLayer

      public ValueDisplayLayer3D createValueLayerDisplayLayer(ValueLayerStyle3D style)
      Specified by:
      createValueLayerDisplayLayer in class AbstractDisplay3D
    • getPanel

      public JPanel getPanel()
      Description copied from interface: IDisplay
      Gets a panel that contains the actual gui for visualization.
      Returns:
      a panel that contains the actual gui for visualization.
    • render

      public void render()
      Description copied from interface: Renderer
      Render the display. This rendering should take place asynchronously on the AWT thread.
    • setPause

      public void setPause(boolean pause)
      Description copied from interface: Renderer
      Pause the rendering. The Renderer should update and render if pause is true, if possible. The rendering should take place asynchronously on the AWT thread.
    • closed

      public void closed()
      Notifies this IDisplay that its associated gui widget has been closed.
    • iconified

      public void iconified()
      Notifies this IDisplay that its associated gui widget has been iconified.
    • deIconified

      public void deIconified()
      Notifies this IDisplay that its associated gui widget has been deIconified.
    • destroy

      public void destroy()
      Description copied from class: AbstractDisplay
      Destroys the display, allowing it to free any resources it may have acquired.
      Specified by:
      destroy in interface IDisplay
      Overrides:
      destroy in class AbstractDisplay
    • windowDeiconified

      public void windowDeiconified(WindowEvent e)
      Specified by:
      windowDeiconified in interface WindowListener
      Overrides:
      windowDeiconified in class AbstractDisplay3D
    • getLayout

      public Layout getLayout()
      Description copied from interface: IDisplay
      Gets the layout the display uses
      Returns:
      a layout object
    • createEditor

      public DisplayEditorLifecycle createEditor(JPanel panel)
      Creates an DisplayEditor appropriate for editing this display.
      Parameters:
      panel -
      Returns:
      an DisplayEditor appropriate for editing this display or null if this display cannot be edited.
    • resetHomeView

      public void resetHomeView()
      Resets the view to the original zoom and camera position
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
    • toggleInfoProbe

      public void toggleInfoProbe()