Purpose
Generalized interfaces and specific implementations are provided that navigate in space in order to view objects and scenes. These systems loosely follow the model/view/controller design pattern.
Classes
- fe::ViewerI is a display mechanism for controlled models. The interface simply needs to be told which fe::WindowI to use for rendering.
- fe::ControllerI maps window events into changes in the view, such as using mouse motion to spin an object. The controller simply adjusts transforms. It is up to the viewer to use these transforms to place objects and a camera.
- fe::QuickViewerI represents a minimalist mechanism to view an object in a nearly completely pre-determined manner. It preloads an accessible fe::DrawI which it uses to draw the point of interest as a magenta marker. Usage involves a single method taking an fe:HandlerI and frame count. It operates similar to a simple callback by signaling the handler each frame.
InspectController
The fexViewer library provides an fe::ControllerI implementation called fe::InspectController. When the control key is held, the mouse is interpreted to manipulate the view as follows:
- LeftMouse drag spins along two axes. Tilting is prevented.
- MiddleMouse drag pans the object relative to the camera view plane.
- MiddleMouse wheel and Rightmouse drag zooms the object (technically, this is a "dolly", a panning in and out, not a field-of-view change like in photography).
ObjectViewer
The fexViewer library provides an fe::ViewerI implementation called fe::ObjectViewer. This viewer provides an HandlerI/SignalerI which handles and proxies an AsViewer record multiple times per frame. This signal includes an incrementing layer as well as a perspective flag. This mechanism is subject to likely future refinement.