Class Display3D
java.lang.Object
repast.simphony.visualization.AbstractDisplay
repast.simphony.visualization.visualization3D.AbstractDisplay3D
repast.simphony.visualization.visualization3D.Display3D
- All Implemented Interfaces:
WindowListener,EventListener,Renderer,ProjectionListener,IDisplay
3D Display class based on J3D. Uses a behavior to update the display.
- Author:
- Nick Collier
-
Nested Class Summary
Nested classes/interfaces inherited from interface repast.simphony.visualization.IDisplay
IDisplay.LayoutFrequency -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected org.jogamp.java3d.exp.swing.JCanvas3Dprotected EdgeStyle3Dprotected Style3Dprotected booleanprotected org.jogamp.java3d.utils.pickfast.PickCanvasprotected org.jogamp.java3d.TransformGroupprotected org.jogamp.java3d.BranchGroupprotected org.jogamp.java3d.TransformGroupstatic final intprotected org.jogamp.java3d.utils.universe.SimpleUniverseprotected booleanprotected repast.simphony.visualization.visualization3D.Display3D.MainBehaviorprotected org.jogamp.java3d.TransformGroupFields inherited from class repast.simphony.visualization.visualization3D.AbstractDisplay3D
decoratorMap, displayMap, iconified, initData, layout, networkMap, panel, valueLayer, valueLayerStyleFields inherited from class repast.simphony.visualization.AbstractDisplay
dlSupport, FRAME_UPDATE_INTERVAL, INFO_CURSOR, lastRenderTS, probeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclosed()Notifies this IDisplay that its associated gui widget has been closed.protected AbstractDisplayLayer3DcreateDisplayLayer(Style3D style) createEdgeLayer(EdgeStyle3D style, Network network) createEditor(JPanel panel) Creates an DisplayEditor appropriate for editing this display.voidNotifies this IDisplay that its associated gui widget has been deIconified.voiddestroy()Destroys the display, allowing it to free any resources it may have acquired.org.jogamp.java3d.exp.swing.JCanvas3DGets the layout the display usesgetPanel()Gets a panel that contains the actual gui for visualization.org.jogamp.java3d.BranchGroupgetVisualObject(Object obj) voidNotifies this IDisplay that its associated gui widget has been iconified.voidinit()Initializes the display.voidprobe(org.jogamp.java3d.Shape3D shape, org.jogamp.vecmath.Point3d intersectPoint) Given the shape3D, probe the object that it represents.voidrender()Render the display.voidResets the view to the original zoom and camera positionvoidsetBackgroundColor(Color backgroundColor) voidsetPause(boolean pause) Pause the rendering.voidvoidMethods inherited from class repast.simphony.visualization.visualization3D.AbstractDisplay3D
addObject, createPanel, findLayer, getInitData, getRegisteredAgents, moveObject, registerDecorator, registerNetworkStyle, registerStyle, registerValueLayerStyle, removeObject, setLayout, setLayoutFrequency, update, windowActivated, windowClosed, windowClosing, windowDeactivated, windowIconified, windowOpenedMethods inherited from class repast.simphony.visualization.AbstractDisplay
addDisplayListener, addProbeListener, createInfoCursor, getProbeSupport, projectionEventOccurred, registerToolBar, setProbeSupport
-
Field Details
-
TRANSFORMS_APPLIED
public static final int TRANSFORMS_APPLIED- See Also:
-
defaultStyle
-
defaultEdgeStyle
-
firstRender
protected boolean firstRender -
backgroundColor
-
pick
protected org.jogamp.java3d.utils.pickfast.PickCanvas pick -
canvas
protected org.jogamp.java3d.exp.swing.JCanvas3D canvas -
sceneRoot
protected org.jogamp.java3d.BranchGroup sceneRoot -
universe
protected org.jogamp.java3d.utils.universe.SimpleUniverse universe -
updater
protected repast.simphony.visualization.visualization3D.Display3D.MainBehavior updater -
topRotTransGroup
protected org.jogamp.java3d.TransformGroup topRotTransGroup -
projectionTransGroup
protected org.jogamp.java3d.TransformGroup projectionTransGroup -
valueLayerTransGroup
protected org.jogamp.java3d.TransformGroup valueLayerTransGroup -
updatedLastRender
protected boolean updatedLastRender
-
-
Constructor Details
-
Display3D
-
-
Method Details
-
init
public void init()Description copied from interface:IDisplayInitializes the display. Called once before the display is made visible.- Specified by:
initin interfaceIDisplay- Overrides:
initin classAbstractDisplay3D
-
getCanvas
public org.jogamp.java3d.exp.swing.JCanvas3D getCanvas()- Specified by:
getCanvasin classAbstractDisplay3D
-
getSceneRoot
public org.jogamp.java3d.BranchGroup getSceneRoot() -
probe
public void probe(org.jogamp.java3d.Shape3D shape, org.jogamp.vecmath.Point3d intersectPoint) Given the shape3D, probe the object that it represents.- Parameters:
shape- the shape representing the object we want to probeintersectPoint- the intersection point of the pick itself
-
getVisualObject
-
createDisplayLayer
- Specified by:
createDisplayLayerin classAbstractDisplay3D
-
createEdgeLayer
- Specified by:
createEdgeLayerin classAbstractDisplay3D
-
createValueLayerDisplayLayer
- Specified by:
createValueLayerDisplayLayerin classAbstractDisplay3D
-
getPanel
Description copied from interface:IDisplayGets a panel that contains the actual gui for visualization.- Returns:
- a panel that contains the actual gui for visualization.
-
render
public void render()Description copied from interface:RendererRender the display. This rendering should take place asynchronously on the AWT thread. -
setPause
public void setPause(boolean pause) Description copied from interface:RendererPause the rendering. The Renderer should update and render if pause is true, if possible. The rendering should take place asynchronously on the AWT thread. -
closed
public void closed()Notifies this IDisplay that its associated gui widget has been closed. -
iconified
public void iconified()Notifies this IDisplay that its associated gui widget has been iconified. -
deIconified
public void deIconified()Notifies this IDisplay that its associated gui widget has been deIconified. -
destroy
public void destroy()Description copied from class:AbstractDisplayDestroys the display, allowing it to free any resources it may have acquired.- Specified by:
destroyin interfaceIDisplay- Overrides:
destroyin classAbstractDisplay
-
windowDeiconified
- Specified by:
windowDeiconifiedin interfaceWindowListener- Overrides:
windowDeiconifiedin classAbstractDisplay3D
-
getLayout
Description copied from interface:IDisplayGets the layout the display uses- Returns:
- a layout object
-
createEditor
Creates an DisplayEditor appropriate for editing this display.- Parameters:
panel-- Returns:
- an DisplayEditor appropriate for editing this display or null if this display cannot be edited.
-
resetHomeView
public void resetHomeView()Resets the view to the original zoom and camera position -
setBackgroundColor
-
toggleInfoProbe
public void toggleInfoProbe()
-