Package org.evoludo.simulator.views
Class Pop3D
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsRenderable
,IsWidget
,ProvidesResize
,RequiresResize
,AbstractGraph.Controller
,GenericPopGraph.PopGraphController
,TooltipProvider
,TooltipProvider.Index
,ChangeListener
,MilestoneListener
,BasicTooltipProvider
The view to display configuration of the current state of the model in 3D.
The visual representation depends on the geometry of the model. Lattice
structures have a fixed layout but all other strutures are dynamically
generated through a process insipired by the physical arrangement of charged
spheres that are connected by springs. The spheres represent members of the
population and the springs represent their interaction (or competition)
neighbourhood. The size of the sphere scales with the size of the
individual's neighbourhood. Moreover, the colour of the spheres reflects the
state of the individual, for example their trait or fitness.
- Author:
- Christoph Hauert
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractView
AbstractView.ExportCommand, AbstractView.ExportType
Nested classes/interfaces inherited from class UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface ChangeListener
ChangeListener.PendingAction
Nested classes/interfaces inherited from interface TooltipProvider
TooltipProvider.Index, TooltipProvider.Parametric, TooltipProvider.Simplex
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContextMenuCheckBoxItem
The context menu item for selecting anaglyph projection of the 3D space for a reperesentation of the graph suitable for colored 3D glasses.private ContextMenuCheckBoxItem
The context menu item for selecting parallel projection of the graph instead of the default perspective projection.private ContextMenuCheckBoxItem
The context menu item for selecting stereo projection of the 3D space for a virtual reality representation of the graph.Fields inherited from class GenericPop
graphs, hitNode, tag
Fields inherited from class AbstractView
engine, exportSubmenu, exportSubmenuTrigger, gCols, gRows, isActive, isLoaded, logger, MIN_MSEC_BETWEEN_UPDATES, model, restoreMenu, timestamp, type, updatetime, wrapper
Fields inherited from class UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionPop3D
(EvoLudoGWT engine, Data type) Construct a new view to display the configuration of the current state of the EvoLudo model in 3D. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Allocate all graphs managed by this view.protected AbstractView.ExportType[]
Return the list of export types that are acceptable for _all_ graphs in this view.void
Called after the EvoLudo model got re-initialized.void
Opportunity for the controller to add functionality to the context menu (optional implementation).void
reset
(boolean hard) Called when a module has been reset.Methods inherited from class GenericPop
destroyGraphs, getName, getTooltipAt, hasLayout, keyDownHandler, layoutComplete, modelChanged, mouseHitNode, setGraphGeometry, unload, update
Methods inherited from class AbstractView
activate, clear, createWidget, deactivate, dispose, export, export, exportDataHeader, exportMeanData, exportPNG, exportStatData, exportSVG, exportTrajData, getGraphAt, getLogger, getMode, getModel, getStatus, getStatus, getType, isRunning, keyUpHandler, load, modelDidReset, modelStopped, modelUnloaded, moduleRestored, moduleUnloaded, onResize, scheduleUpdate, setBounds, setMode, shift, update, zoom
Methods inherited from class Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods inherited from class Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface AbstractGraph.Controller
getLogger, getModel, getType, isRunning, setInitialState
Methods inherited from interface BasicTooltipProvider
getTooltipAt, getTooltipAt
Methods inherited from interface GenericPopGraph.PopGraphController
mouseHitNode, populateContextMenuAt
Methods inherited from interface MilestoneListener
modelLoaded, modelRelaxed, modelRunning, modelSettings, moduleLoaded
-
Field Details
-
projectionMenu
The context menu item for selecting parallel projection of the graph instead of the default perspective projection. -
anaglyphMenu
The context menu item for selecting anaglyph projection of the 3D space for a reperesentation of the graph suitable for colored 3D glasses. -
vrMenu
The context menu item for selecting stereo projection of the 3D space for a virtual reality representation of the graph.
-
-
Constructor Details
-
Pop3D
Construct a new view to display the configuration of the current state of the EvoLudo model in 3D.- Parameters:
engine
- the pacemaker for running the modeltype
- the type of data to display
-
-
Method Details
-
allocateGraphs
protected void allocateGraphs()Description copied from class:AbstractView
Allocate all graphs managed by this view. This is called when loading the view. Once all views are attached to the browser DOM a call to the graph'scalcBounds(int, int)
is triggered throughsetBounds(int, int)
to properly calculate the layout.- Specified by:
allocateGraphs
in classAbstractView
- See Also:
-
reset
public void reset(boolean hard) Description copied from class:AbstractView
Called when a module has been reset. All graphs are reset and updated if needed, unlesshard
istrue
.- Overrides:
reset
in classAbstractView
- Parameters:
hard
- the flag to indicate whether to do a hard reset
-
modelDidInit
public void modelDidInit()Description copied from interface:MilestoneListener
Called after the EvoLudo model got re-initialized.- Specified by:
modelDidInit
in interfaceMilestoneListener
- Overrides:
modelDidInit
in classGenericPop<MeshLambertMaterial,
Network3DGWT, PopGraph3D>
-
populateContextMenu
Description copied from interface:AbstractGraph.Controller
Opportunity for the controller to add functionality to the context menu (optional implementation).- Specified by:
populateContextMenu
in interfaceAbstractGraph.Controller
- Overrides:
populateContextMenu
in classAbstractView
- Parameters:
menu
- the context menu
-
exportTypes
Description copied from class:AbstractView
Return the list of export types that are acceptable for _all_ graphs in this view.- Overrides:
exportTypes
in classAbstractView
- Returns:
- the list of viable export types
-