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
FieldsModifier and TypeFieldDescriptionprotected VisualItem3DAdderRemoverprotected org.jogamp.java3d.BranchGroupprotected Style3Dprotected final Map<Object,VisualItem3D> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified object to the layer.voidApply the updates to the scene graph.protected abstract voidcreateItemsForAddedObjects(Layout layout, boolean doLayout) protected abstract Labelprotected abstract voidfindObjsForItem(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 voidvoidremoveObject(Object obj) Removes the specified objecdt from the layer.voidvoidupdate(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:IDisplayLayerAdds the specified object to the layer.- Specified by:
addObjectin interfaceIDisplayLayer<VisualItem3D>- Parameters:
obj- the object to add
-
removeObject
Description copied from interface:IDisplayLayerRemoves the specified objecdt from the layer.- Specified by:
removeObjectin interfaceIDisplayLayer<VisualItem3D>- Parameters:
obj- the object to remove
-
createItemsForAddedObjects
-
removeItemsForRemovedObjects
protected void removeItemsForRemovedObjects() -
getVisualItem
Description copied from interface:IDisplayLayerGets the visual representation of this object.- Specified by:
getVisualItemin 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:
findObjsForItemin 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:IDisplayLayerUpdates the layout, styles etc. of the displayed objects.- Specified by:
updatein 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:
applyUpdatesin interfaceIDisplayLayer<VisualItem3D>
-