Class PopGraph3D.Pop3DScene

All Implemented Interfaces:
RequiresResize
Enclosing class:
PopGraph3D

public class PopGraph3D.Pop3DScene extends AnimatedScene implements RequiresResize
The class for animating the 3D network structure.
  • Field Details

    • control

      The control for rotating and zooming the scene.
    • renderingPanel

      RenderingPanel renderingPanel
      Helper variable to fix unnecessary exceptions in parallax (renderingPanel is private in RenderingPanel class).
  • Constructor Details

    • Pop3DScene

      public Pop3DScene()
      Create a new 3D scene.
  • Method Details

    • onStart

      protected void onStart()

      The scene should be defined already.

      Specified by:
      onStart in class Animation
      See Also:
    • getRenderer

      public WebGLRenderer getRenderer()
      Overrides:
      getRenderer in class AnimatedScene
    • getCanvas

      public Canvas3d getCanvas()
      Overrides:
      getCanvas in class AnimatedScene
    • init

      public void init(RenderingPanel renderingPanel, AnimatedScene.AnimationUpdateHandler animationUpdateHandler)
      Overrides:
      init in class AnimatedScene
    • positionCamera

      public void positionCamera()
      Positions the camera. The camera position is shared between different views of the 3D graph, e.g. view of the strategies and view of fitnesses.
      See Also:
    • setOrtho

      private void setOrtho(boolean doOrthographic)
      Helper method to allocate, set, or change the camera for the scene.
      Parameters:
      doOrthographic - true for an orthographic projection
    • onResize

      public void onResize()
      Specified by:
      onResize in interface RequiresResize
    • onUpdate

      protected void onUpdate(double duration)

      Update the view of the scene (perform rotations, zooming and panning, as requested) and render the scene.

      Specified by:
      onUpdate in class AnimatedScene
    • zoom

      public void zoom()
      Reset zoom level.
    • zoom

      public void zoom(double zoom)
      Adjust zoom level by the factor zoom. Leave the center of the view in place.
      Parameters:
      zoom - the new zoom level