Module imp3d

Class View3D

All Implemented Interfaces:
ViewConfig3D, Manageable, SharedObjectReference, XAListener, Context, Panel, Disposable, EventListener, ModifiableMap.Producer, EventListener, TreeModelListener

public class View3D extends View implements SharedObjectReference, ViewConfig3D, XAListener
A View3D is a View which displays a graph as a 3D structure.
Author:
Ole Kniemeyer
  • Field Details

  • Constructor Details

    • View3D

      public View3D()
  • Method Details

    • getSelectableCamera

      public static Selectable getSelectableCamera(Context ctx)
    • getFlavor

      public IOFlavor getFlavor()
      Specified by:
      getFlavor in class View
    • getToolProperty

      protected UIProperty getToolProperty()
      Specified by:
      getToolProperty in class View
    • getViewEventFactoryProperty

      protected UIProperty getViewEventFactoryProperty()
      Specified by:
      getViewEventFactoryProperty in class View
    • getResolutionProperty

      public UIProperty getResolutionProperty()
      Specified by:
      getResolutionProperty in class View
    • createEventHandler

      protected ViewEventHandler createEventHandler()
      Specified by:
      createEventHandler in class View
    • initialize

      public Panel initialize(Panel panel, Map params)
      Specified by:
      initialize in interface Panel
      Overrides:
      initialize in class View
    • installImpl

      protected void installImpl()
      Specified by:
      installImpl in class View
    • uninstallImpl

      protected void uninstallImpl()
      Specified by:
      uninstallImpl in class View
    • pick

      public final void pick(int x, int y, PickList list)
      Specified by:
      pick in class View
    • pickTool

      public final void pickTool(int x, int y, PickList list)
      Specified by:
      pickTool in class View
    • isToolGraph

      public boolean isToolGraph(Graph graph)
      Specified by:
      isToolGraph in class View
    • estimateScaleAt

      public float estimateScaleAt(float x, float y, float z, Matrix4d t)
    • estimateScaleAt

      public float estimateScaleAt(Tuple3d p, Matrix4d t)
    • estimateScaleAt

      public float estimateScaleAt(Tuple3f p, Matrix4d t)
    • getCanvasCamera

      public CanvasCamera getCanvasCamera()
    • eventOccured

      public void eventOccured(EventObject e)
      Description copied from interface: EventListener
      This method is invoked on registered event listeners when event 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 interface EventListener
      Overrides:
      eventOccured in class View
      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

      public void setCamera(Camera c)
    • repaint

      public void repaint()
    • sharedObjectModified

      public void sharedObjectModified(Shareable object, Transaction t)
      Specified by:
      sharedObjectModified in interface SharedObjectReference
    • setCameraTransformation

      public void setCameraTransformation(Matrix4d transformation)
    • getDefaultView

      public static View3D getDefaultView(Context ctx)
    • withCamera

      public static ViewConfig3D withCamera(ViewConfig3D v, Camera c)
    • getDefaultViewConfig

      public static ViewConfig3D getDefaultViewConfig(Context ctx)
    • getDefaultLight

      public Light getDefaultLight(Matrix4d lightToWorld)
      Description copied from interface: ViewConfig3D
      Computes a default light to use when a scene contains no lights.
      Specified by:
      getDefaultLight in interface ViewConfig3D
      Parameters:
      lightToWorld - the computed transformation for the light is placed in here
      Returns:
      a default light
    • getDefaultLight

      public static Light getDefaultLight(Camera camera, Matrix4d lightToWorld)
      Computes a default light to use when a scene contains no lights.
      Parameters:
      camera - used camera
      lightToWorld - the computed transformation for the light is placed in here
      Returns:
      a default light
    • setExtent

      public void setExtent(Tuple3f center, float radius)
      This callback method should be invoked by the 3D-ViewComponent which displays the scene in order to inform this View3D about the geometrical extent of the whole scene. center and radius should define a bounding sphere (or at least an approximation thereof) of all visible finite objects in view coordinates, i.e., after Camera.getWorldToViewTransformation() has been applied.
      Parameters:
      center - center of bounding sphere
      radius - radius of bounding sphere
    • isInVisibleScale

      public boolean isInVisibleScale(Object o, boolean asNode, GraphState state)
      Specified by:
      isInVisibleScale in interface ViewConfig3D
      Overrides:
      isInVisibleScale in class View
    • transactionApplied

      public void transactionApplied(Transaction.Data xa, boolean rollback)
      Specified by:
      transactionApplied in interface XAListener
    • getManageableType

      public ManageableType getManageableType()
      Specified by:
      getManageableType in interface Manageable
    • getCamera

      public Camera getCamera()
      Specified by:
      getCamera in interface ViewConfig3D
    • getEventFactory

      public ViewEventFactory getEventFactory()
    • setEventFactory

      public void setEventFactory(ViewEventFactory value)