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.ExportTypeNested classes/interfaces inherited from class UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface ChangeListener
ChangeListener.PendingActionNested classes/interfaces inherited from interface TooltipProvider
TooltipProvider.Index, TooltipProvider.Parametric, TooltipProvider.Simplex -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContextMenuCheckBoxItemThe context menu item for selecting anaglyph projection of the 3D space for a reperesentation of the graph suitable for colored 3D glasses.private ContextMenuCheckBoxItemThe context menu item for selecting parallel projection of the graph instead of the default perspective projection.private ContextMenuCheckBoxItemThe 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, tagFields inherited from class AbstractView
engine, exportSubmenu, exportSubmenuTrigger, gCols, gRows, isActive, isLoaded, logger, MIN_MSEC_BETWEEN_UPDATES, model, restoreMenu, timestamp, type, updatetime, wrapperFields 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 voidAllocate all graphs managed by this view.protected AbstractView.ExportType[]Return the list of export types that are acceptable for _all_ graphs in this view.voidCalled after the EvoLudo model got re-initialized.voidOpportunity for the controller to add functionality to the context menu (optional implementation).voidreset(boolean hard) Called when a module has been reset.Methods inherited from class GenericPop
destroyGraphs, getName, getTooltipAt, hasLayout, keyDownHandler, layoutComplete, modelChanged, mouseHitNode, setGraphGeometry, unload, updateMethods inherited from class AbstractView
activate, 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, zoomMethods inherited from class Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods 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, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AbstractGraph.Controller
getLogger, getModel, getType, isRunning, setInitialStateMethods inherited from interface BasicTooltipProvider
getTooltipAt, getTooltipAtMethods inherited from interface GenericPopGraph.PopGraphController
mouseHitNode, populateContextMenuAtMethods 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:AbstractViewAllocate 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:
allocateGraphsin classAbstractView- See Also:
-
reset
public void reset(boolean hard) Description copied from class:AbstractViewCalled when a module has been reset. All graphs are reset and updated if needed, unlesshardistrue.- Overrides:
resetin classAbstractView- Parameters:
hard- the flag to indicate whether to do a hard reset
-
modelDidInit
public void modelDidInit()Description copied from interface:MilestoneListenerCalled after the EvoLudo model got re-initialized.- Specified by:
modelDidInitin interfaceMilestoneListener- Overrides:
modelDidInitin classGenericPop<MeshLambertMaterial,Network3DGWT, PopGraph3D>
-
populateContextMenu
Description copied from interface:AbstractGraph.ControllerOpportunity for the controller to add functionality to the context menu (optional implementation).- Specified by:
populateContextMenuin interfaceAbstractGraph.Controller- Overrides:
populateContextMenuin classAbstractView- Parameters:
menu- the context menu
-
exportTypes
Description copied from class:AbstractViewReturn the list of export types that are acceptable for _all_ graphs in this view.- Overrides:
exportTypesin classAbstractView- Returns:
- the list of viable export types
-