Class Network3DGWT

All Implemented Interfaces:
Iterable<Node>, Collection<Node>, Iterator<Node>, List<Node>, SequencedCollection<Node>

public class Network3DGWT extends Network3D
Graphical representation of generic population geometries in 3D. A network corresponds to a (possibly ephemeral) collection and configuration of nodes. This implementation includes optimizations for GWT when scheduling computationally intensive tasks.
Author:
Christoph Hauert
  • Field Details

    • worldView

      Camera worldView
      The Camera controlling the view of the network. Needed to exchange the visual perspective of different views. For example the 3D view of strategies and of payoffs should use the same perspective.
    • layout

      Duration layout
      Helper variable to keep track of the time spent layouting the network.
    • prevLayout

      int prevLayout
      Time when last layout update was processed.
    • MIN_DELAY_ANIMATE_MSEC

      protected static final int MIN_DELAY_ANIMATE_MSEC
      Minimum delay in milliseconds between subsequent updates of the layout in the GUI. This is used to throttle the animated layout process to a default of at most 20 updates per second.
      See Also:
    • nextLayoutNode

      protected int nextLayoutNode
      Helper variable to store the index of the node that needs to be processed next. This is to prevent the GUI from becoming unresponsive and allow the layouting process to resume after relaxing a fixed number of nodes.
      See Also:
  • Constructor Details

    • Network3DGWT

      public Network3DGWT(EvoLudo engine, Geometry geometry)
      Create a new network in 3D for the given engine and geometry with a layouting process optimzed for GWT.
      Parameters:
      engine - the pacemaker for running the model
      geometry - the structure of the population
  • Method Details

    • reset

      public void reset()
      Description copied from class: Network
      Reset the network (discard any existing layouts).
      Overrides:
      reset in class Network
    • getWorldView

      public Camera getWorldView()
      Get the visual perspective of this network. This can be manipulated by the GUI but must be synchronized between different views (e.g. strategies versus payoffs) to avoid confusing the user.
      Returns:
      the perspective of the network
    • setWorldView

      public void setWorldView(Camera worldView)
      Set the visual perspective of this network. This can be manipulated by the GUI but must be synchronized between different views (e.g. strategies versus payoffs) to avoid confusing the user.
      Parameters:
      worldView - the new visual perspective
    • getLinks

      public Geometry getLinks()
      Get the links of this 3D network representation.
      Returns:
      the links of this network
    • linkNodes

      public void linkNodes()
      Description copied from class: Network
      Generate the links for the current configuration of the network.
      Specified by:
      linkNodes in class Network
    • doLayout

      public void doLayout(Network.LayoutListener ll)
      Description copied from class: Network
      Start the layouting process. The layout listener (if any) is informed about the progress of the layouting process. Implementations can take advantage of optimizations available for GWT (scheduling) or JRE (multiple threads).
      Specified by:
      doLayout in class Network
      Parameters:
      ll - the layout listener
      See Also:
    • doLayoutStep

      protected boolean doLayoutStep()
      Perform a single step in the layouting process by relaxing nodes sequentially. Returns false once the layouting process has completed, i.e. reached the desired accuracy or the time out.
      Returns:
      true if the layouting process should continue