java.lang.Object
de.grogra.pf.ui.PanelDecorator
de.grogra.imp.View
de.grogra.imp3d.View3D
- All Implemented Interfaces:
ViewConfig3D
,Manageable
,SharedObjectReference
,XAListener
,Context
,Panel
,Disposable
,EventListener
,ModifiableMap.Producer
,EventListener
,TreeModelListener
A
View3D
is a View
which displays a graph
as a 3D structure.- Author:
- Ole Kniemeyer
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.imp.View
View.SceneListener
Nested classes/interfaces inherited from interface de.grogra.util.EventListener
EventListener.Bicast, EventListener.Multicaster
Nested classes/interfaces inherited from interface de.grogra.persistence.XAListener
XAListener.WeakDelegate
-
Field Summary
Modifier and TypeFieldDescriptionstatic final View3D.Type
static final SCOType.Field
protected CanvasCamera
static final UIProperty
static final UIProperty
static final SCOType.Field
static final IOFlavor
static final String
static final UIProperty
static final UIProperty
Fields inherited from class de.grogra.imp.View
ANAGLYPH_MAX, ANAGLYPH_VIEW_TYPE, COMPONENT, epsilon$FIELD, graphDescriptor$FIELD, I18N, listeners, LOD_MAX, LOD_MIN, LOD_TYPE, magnitude$FIELD, PREVIEW_MAX, SCALE_COUNT, SCALES_CHANGED, SCALES_VISIBLE, STEREO_MAX, STEREO_VIEW_TYPE, VIEW_PREVIEW1_TYPE, VIEW_PREVIEW2_TYPE, visibleLayers$FIELD, visibleScales$FIELD, visualEpsilon$FIELD
Fields inherited from class de.grogra.pf.ui.PanelDecorator
decorator, panel
Fields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ViewEventHandler
void
dolly
(int dx, int dy) void
dollyOrZoom
(int dx, int dy) float
estimateScaleAt
(float x, float y, float z, Matrix4d t) float
estimateScaleAt
(Tuple3d p, Matrix4d t) float
estimateScaleAt
(Tuple3f p, Matrix4d t) void
This method is invoked on registered event listeners whenevent
has occured.static Light
getDefaultLight
(Camera camera, Matrix4d lightToWorld) Computes a default light to use when a scene contains no lights.getDefaultLight
(Matrix4d lightToWorld) Computes a default light to use when a scene contains no lights.static View3D
getDefaultView
(Context ctx) static ViewConfig3D
static Selectable
protected UIProperty
protected UIProperty
initialize
(Panel panel, Map params) protected void
boolean
isInVisibleScale
(Object o, boolean asNode, GraphState state) boolean
isToolGraph
(Graph graph) void
move
(int dx, int dy) final void
final void
void
repaint()
void
rotate
(int dx, int dy) void
void
setCameraTransformation
(Matrix4d transformation) void
setEventFactory
(ViewEventFactory value) void
This callback method should be invoked by the 3D-ViewComponent
which displays the scene in order to inform thisView3D
about the geometrical extent of the whole scene.void
sharedObjectModified
(Shareable object, Transaction t) void
transactionApplied
(Transaction.Data xa, boolean rollback) protected void
static ViewConfig3D
withCamera
(ViewConfig3D v, Camera c) Methods inherited from class de.grogra.imp.View
addEventListener, addMappings, addToolListener, create, disableRepaint, dispose, disposeRenderer, enableRepaint, fieldModified, get, get, getActiveTool, getEpsilon, getEpsilonSquared, getEventHandler, getGraph, getMagnitude, getMagnitudeSquared, getPathFor, getSelectableGraph, getSelectableLayers, getSelectableScales, getSize, getStamp, getViewComponent, getViewComponent, getVisibleLayers, getVisibleScales, getVisualEpsilon, getVisualEpsilonSquared, getWorkbenchGraphState, isInVisibleLayer, isRepaint, manageableReadResolve, manageableWriteReplace, nextTool, removeEventListener, render, renderToFile, repaint, set, setActiveTool, setDimensions, setDimensions, setEpsilon, setGraph, setGraph, setMagnitude, setViewComponent, setVisibleLayers, setVisualEpsilon, substituteSelection, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, uninstall
Methods inherited from class de.grogra.pf.ui.PanelDecorator
checkClose, getComponent, getContent, getDecorator, getMenu, getPanel, getPanelId, getUIPropertyMap, getWindow, getWorkbench, initDecorator, initPanel, resolve, setContent, setCursor, setMenu, show
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.imp3d.ViewConfig3D
getEpsilon, getGraph, getWorkbench, isInVisibleLayer
-
Field Details
-
INITIAL_CAMERA
- See Also:
-
FLAVOR
-
DISPLAY
-
EVENTFACTORY
-
TOOL
-
RESOLUTION
-
canvasCam
-
$TYPE
-
camera$FIELD
-
eventFactory$FIELD
-
-
Constructor Details
-
View3D
public View3D()
-
-
Method Details
-
getSelectableCamera
-
getFlavor
-
getToolProperty
- Specified by:
getToolProperty
in classView
-
getViewEventFactoryProperty
- Specified by:
getViewEventFactoryProperty
in classView
-
getResolutionProperty
- Specified by:
getResolutionProperty
in classView
-
createEventHandler
- Specified by:
createEventHandler
in classView
-
initialize
- Specified by:
initialize
in interfacePanel
- Overrides:
initialize
in classView
-
installImpl
protected void installImpl()- Specified by:
installImpl
in classView
-
uninstallImpl
protected void uninstallImpl()- Specified by:
uninstallImpl
in classView
-
pick
-
pickTool
-
isToolGraph
- Specified by:
isToolGraph
in classView
-
estimateScaleAt
-
estimateScaleAt
-
estimateScaleAt
-
getCanvasCamera
-
eventOccured
Description copied from interface:EventListener
This method is invoked on registered event listeners whenevent
has occured. This general listener interface does not restrict the possible kinds of events. Concrete sources of events should specify which events they may fire.- Specified by:
eventOccured
in interfaceEventListener
- Overrides:
eventOccured
in classView
- Parameters:
e
- an event
-
dollyOrZoom
public void dollyOrZoom(int dx, int dy) -
dolly
public void dolly(int dx, int dy) -
move
public void move(int dx, int dy) -
rotate
public void rotate(int dx, int dy) -
setCamera
-
repaint
public void repaint() -
setCameraTransformation
-
getDefaultView
-
withCamera
-
getDefaultViewConfig
-
getDefaultLight
Description copied from interface:ViewConfig3D
Computes a default light to use when a scene contains no lights.- Specified by:
getDefaultLight
in interfaceViewConfig3D
- Parameters:
lightToWorld
- the computed transformation for the light is placed in here- Returns:
- a default light
-
getDefaultLight
Computes a default light to use when a scene contains no lights.- Parameters:
camera
- used cameralightToWorld
- the computed transformation for the light is placed in here- Returns:
- a default light
-
setExtent
This callback method should be invoked by the 3D-ViewComponent
which displays the scene in order to inform thisView3D
about the geometrical extent of the whole scene.center
andradius
should define a bounding sphere (or at least an approximation thereof) of all visible finite objects in view coordinates, i.e., afterCamera.getWorldToViewTransformation()
has been applied.- Parameters:
center
- center of bounding sphereradius
- radius of bounding sphere
-
isInVisibleScale
- Specified by:
isInVisibleScale
in interfaceViewConfig3D
- Overrides:
isInVisibleScale
in classView
-
transactionApplied
- Specified by:
transactionApplied
in interfaceXAListener
-
getManageableType
- Specified by:
getManageableType
in interfaceManageable
-
getCamera
- Specified by:
getCamera
in interfaceViewConfig3D
-
getEventFactory
-
setEventFactory
-