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
Modifier and TypeFieldDescriptionprotected Color
protected org.jogamp.java3d.exp.swing.JCanvas3D
protected EdgeStyle3D
protected Style3D
protected boolean
protected org.jogamp.java3d.utils.pickfast.PickCanvas
protected org.jogamp.java3d.TransformGroup
protected org.jogamp.java3d.BranchGroup
protected org.jogamp.java3d.TransformGroup
static final int
protected org.jogamp.java3d.utils.universe.SimpleUniverse
protected boolean
protected repast.simphony.visualization.visualization3D.Display3D.MainBehavior
protected org.jogamp.java3d.TransformGroup
Fields inherited from class repast.simphony.visualization.visualization3D.AbstractDisplay3D
decoratorMap, displayMap, iconified, initData, layout, networkMap, panel, valueLayer, valueLayerStyle
Fields inherited from class repast.simphony.visualization.AbstractDisplay
dlSupport, FRAME_UPDATE_INTERVAL, INFO_CURSOR, lastRenderTS, probeSupport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closed()
Notifies this IDisplay that its associated gui widget has been closed.protected AbstractDisplayLayer3D
createDisplayLayer
(Style3D style) createEdgeLayer
(EdgeStyle3D style, Network network) createEditor
(JPanel panel) Creates an DisplayEditor appropriate for editing this display.void
Notifies this IDisplay that its associated gui widget has been deIconified.void
destroy()
Destroys the display, allowing it to free any resources it may have acquired.org.jogamp.java3d.exp.swing.JCanvas3D
Gets the layout the display usesgetPanel()
Gets a panel that contains the actual gui for visualization.org.jogamp.java3d.BranchGroup
getVisualObject
(Object obj) void
Notifies this IDisplay that its associated gui widget has been iconified.void
init()
Initializes the display.void
probe
(org.jogamp.java3d.Shape3D shape, org.jogamp.vecmath.Point3d intersectPoint) Given the shape3D, probe the object that it represents.void
render()
Render the display.void
Resets the view to the original zoom and camera positionvoid
setBackgroundColor
(Color backgroundColor) void
setPause
(boolean pause) Pause the rendering.void
void
Methods 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, windowOpened
Methods 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:IDisplay
Initializes the display. Called once before the display is made visible.- Specified by:
init
in interfaceIDisplay
- Overrides:
init
in classAbstractDisplay3D
-
getCanvas
public org.jogamp.java3d.exp.swing.JCanvas3D getCanvas()- Specified by:
getCanvas
in 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:
createDisplayLayer
in classAbstractDisplay3D
-
createEdgeLayer
- Specified by:
createEdgeLayer
in classAbstractDisplay3D
-
createValueLayerDisplayLayer
- Specified by:
createValueLayerDisplayLayer
in classAbstractDisplay3D
-
getPanel
Description copied from interface:IDisplay
Gets 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:Renderer
Render the display. This rendering should take place asynchronously on the AWT thread. -
setPause
public void setPause(boolean pause) Description copied from interface:Renderer
Pause 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:AbstractDisplay
Destroys the display, allowing it to free any resources it may have acquired.- Specified by:
destroy
in interfaceIDisplay
- Overrides:
destroy
in classAbstractDisplay
-
windowDeiconified
- Specified by:
windowDeiconified
in interfaceWindowListener
- Overrides:
windowDeiconified
in classAbstractDisplay3D
-
getLayout
Description copied from interface:IDisplay
Gets 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()
-