Class PopGraph3D.Pop3DScene
Object
Animation
AnimatedScene
Pop3DScene
- All Implemented Interfaces:
RequiresResize
- Enclosing class:
PopGraph3D
The class for animating the 3D network structure.
- Author:
- Christoph Hauert
-
Nested Class Summary
Nested classes/interfaces inherited from class AnimatedScene
AnimatedScene.AnimationUpdateHandler -
Field Summary
FieldsModifier and TypeFieldDescription(package private) TrackballControlsThe control for rotating and zooming the scene.(package private) RenderingPanelHelper variable to fix unnecessary exceptions in parallax (renderingPanel is private in RenderingPanel class). -
Constructor Summary
ConstructorsConstructorDescriptionCreate a scene wrapper for the outer graph; scene elements are configured inPopGraph3D.drawUniverse(). -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(RenderingPanel renderingPanel, AnimatedScene.AnimationUpdateHandler animationUpdateHandler) voidonResize()protected voidonStart()protected voidonUpdate(double duration) voidPositions the camera.private voidsetOrtho(boolean doOrthographic) Helper method to allocate, set, or change the camera for the scene.voidzoom()Reset zoom level.voidzoom(double zoom) Adjust zoom level by the factorzoom.Methods inherited from class AnimatedScene
getScene, onRefresh
-
Field Details
-
control
TrackballControls controlThe control for rotating and zooming the scene. -
renderingPanel
RenderingPanel renderingPanelHelper variable to fix unnecessary exceptions in parallax (renderingPanel is private in RenderingPanel class).
-
-
Constructor Details
-
Pop3DScene
public Pop3DScene()Create a scene wrapper for the outer graph; scene elements are configured inPopGraph3D.drawUniverse().
-
-
Method Details
-
onStart
-
getRenderer
- Overrides:
getRendererin classAnimatedScene
-
getCanvas
- Overrides:
getCanvasin classAnimatedScene
-
init
public void init(RenderingPanel renderingPanel, AnimatedScene.AnimationUpdateHandler animationUpdateHandler) - Overrides:
initin classAnimatedScene
-
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-truefor an orthographic projection
-
onResize
public void onResize()- Specified by:
onResizein interfaceRequiresResize
-
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:
onUpdatein classAnimatedScene
-
zoom
public void zoom()Reset zoom level. -
zoom
public void zoom(double zoom) Adjust zoom level by the factorzoom. Leave the center of the view in place.- Parameters:
zoom- the new zoom level
-