Package org.evoludo.graphics
Class PopGraph3D.Pop3DScene
Object
Animation
AnimatedScene
Pop3DScene
- All Implemented Interfaces:
RequiresResize
- Enclosing class:
PopGraph3D
The class for animating the 3D network structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class AnimatedScene
AnimatedScene.AnimationUpdateHandler
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) TrackballControls
The control for rotating and zooming the scene.(package private) RenderingPanel
Helper variable to fix unnecessary exceptions in parallax (renderingPanel is private in RenderingPanel class). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(RenderingPanel renderingPanel, AnimatedScene.AnimationUpdateHandler animationUpdateHandler) void
onResize()
protected void
onStart()
protected void
onUpdate
(double duration) void
Positions the camera.private void
setOrtho
(boolean doOrthographic) Helper method to allocate, set, or change the camera for the scene.void
zoom()
Reset zoom level.void
zoom
(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 new 3D scene.
-
-
Method Details
-
onStart
protected void onStart()The scene should be defined already.
-
getRenderer
- Overrides:
getRenderer
in classAnimatedScene
-
getCanvas
- Overrides:
getCanvas
in classAnimatedScene
-
init
public void init(RenderingPanel renderingPanel, AnimatedScene.AnimationUpdateHandler animationUpdateHandler) - Overrides:
init
in 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
-true
for an orthographic projection
-
onResize
public void onResize()- Specified by:
onResize
in 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:
onUpdate
in 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
-