Class AbstractDisplayLayer3D
java.lang.Object
repast.simphony.visualization.visualization3D.AbstractDisplayLayer3D
- All Implemented Interfaces:
IDisplayLayer<VisualItem3D>
,IDisplayLayer3D
- Direct Known Subclasses:
DisplayLayer3D
,NetworkDisplayLayer3D
- Author:
- Nick Collier
-
Field Summary
Modifier and TypeFieldDescriptionprotected VisualItem3DAdderRemover
protected org.jogamp.java3d.BranchGroup
protected Style3D
protected final Map<Object,
VisualItem3D> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified object to the layer.void
Apply the updates to the scene graph.protected abstract void
createItemsForAddedObjects
(Layout layout, boolean doLayout) protected abstract Label
protected abstract void
findObjsForItem
(org.jogamp.java3d.Shape3D shape) Given a Shape3D, return the object that the shape is the visualization of.getVisualItem
(Object obj) Gets the visual representation of this object.protected void
void
removeObject
(Object obj) Removes the specified objecdt from the layer.void
void
update
(LayoutUpdater updater) Updates the layout, styles etc.
-
Field Details
-
style
-
parentGroup
protected org.jogamp.java3d.BranchGroup parentGroup -
objsToAdd
-
objsToRemove
-
adder
-
visualItemMap
-
-
Constructor Details
-
AbstractDisplayLayer3D
-
-
Method Details
-
addObject
Description copied from interface:IDisplayLayer
Adds the specified object to the layer.- Specified by:
addObject
in interfaceIDisplayLayer<VisualItem3D>
- Parameters:
obj
- the object to add
-
removeObject
Description copied from interface:IDisplayLayer
Removes the specified objecdt from the layer.- Specified by:
removeObject
in interfaceIDisplayLayer<VisualItem3D>
- Parameters:
obj
- the object to remove
-
createItemsForAddedObjects
-
removeItemsForRemovedObjects
protected void removeItemsForRemovedObjects() -
getVisualItem
Description copied from interface:IDisplayLayer
Gets the visual representation of this object.- Specified by:
getVisualItem
in interfaceIDisplayLayer<VisualItem3D>
- Parameters:
obj
- the object whose visual representation we want to get- Returns:
- the visual representation of this object.
-
findObjsForItem
Given a Shape3D, return the object that the shape is the visualization of.- Specified by:
findObjsForItem
in interfaceIDisplayLayer3D
- Parameters:
shape
- the shape whose associated object we want to find- Returns:
- the object that the specified shape represents
-
doUpdate
-
createLabel
-
update
Description copied from interface:IDisplayLayer
Updates the layout, styles etc. of the displayed objects.- Specified by:
update
in interfaceIDisplayLayer<VisualItem3D>
- Parameters:
updater
- used to update the layout and position information
-
setStyle
-
applyUpdates
public void applyUpdates()Apply the updates to the scene graph. This should be called by the 3D behavior in display3D.- Specified by:
applyUpdates
in interfaceIDisplayLayer<VisualItem3D>
-