Class GeometrySliceDemoView

All Implemented Interfaces:
IFeedbackProvider, IFileDropHandler, ComponentListener, FocusListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class GeometrySliceDemoView extends BaseView
Demonstration view showing a two-dimensional slice through a synthetic three-dimensional geometry model.

The view is intentionally built from ordinary MDI 2D items. The underlying model is three-dimensional: it contains region shells and many wire-like line segments. The vertical slider controls the azimuthal angle phi of a constant-phi slicing plane. For each slider value, the 3D shells and wires are intersected with that plane, projected into 2D slice coordinates, and displayed as PolygonItems and PointItems.

The purpose of this demo is not to replace the MDI 3D extension. Instead, it illustrates a common scientific and engineering use case: a diagnostic 2D slice of a 3D object can be easier to inspect, pick, and interrogate than the full 3D rendering.

Display convention

     slice x = z
     slice y = radial distance in the selected phi plane
 

At phi = 0, the view shows z horizontally to the right, x vertically, and y out of the screen. As the slider changes, the slice plane rotates in azimuth.

See Also:
  • Method Details

    • create

      public static GeometrySliceDemoView create()
      Factory method used by the view manager / lazy-view machinery.
      Returns:
      a new geometry slice demo view
    • getViewInfo

      public AbstractViewInfo getViewInfo()
      Override to supply structured information for the info dialog. The default returns null (no info available).
      Overrides:
      getViewInfo in class BaseView
      Returns:
      view info, or null
    • getFeedbackStrings

      public void getFeedbackStrings(IContainer container, Point pp, Point2D.Double wp, List<String> feedbackStrings)
      Default feedback implementation: no-op. Subclasses override to provide coordinate or status strings.
      Specified by:
      getFeedbackStrings in interface IFeedbackProvider
      Overrides:
      getFeedbackStrings in class BaseView
      Parameters:
      container - the container.
      pp - the mouse location.
      wp - the corresponding world point.
      feedbackStrings - the List of feedback strings to add to.