Context:
TYPE ~
RECORD [
shapes: REF ShapeSequence ← NIL, -- current collection of shapes in environment
lights: REF ShapeSequence ← NIL, -- current light sources
environment: Atom.PropList ← NIL, -- for reflection map, ambient light proc, etc.
eyePoint: Triple ← [1.0, -5.0, 2.0], -- defines point from which view is seen
ptOfInterest: Triple ← [0.,0.,0.], -- defines center of image and focus
rollAngle: REAL ← 0., -- rotational angle about direction of view
upDirection: Triple ← [0.,0.,1.], -- defines "heads-up" direction (redundant)
fieldOfView: REAL ← 40., -- horizontal angle included in field of view
window: Imager.Rectangle ← [-1.,-1., 2., 2.], -- window clips field of view in eyespace
hitherLimit: REAL ← 1., -- anything closer to eyepoint is clipped
yonLimit: REAL ← 1000., -- anything further from eyepoint is clipped
clippingPlanes: ARRAY SixSides OF Quad, -- computed clip planes
eyeSpaceXfm: Xfm3D ← NIL, -- world space to eyespace
eyeToNDC: ScaleAndAddXfm ← [1.,1.,1., 0.,0.,0.], -- eyespace to normalized display coords
viewer: REF ANY, -- often a QuickViewer or a ViewerClasses.viewer
display: Pixels.PixelBuffer, -- display-specific info
viewPort: Imager.Rectangle, -- viewport in floating pt. display coordinates
preferredViewPort: Imager.Rectangle ← [0.,0.,65536.,65536.], -- maximum viewport size
extentCovered: Box ← [0, 0, 0, 0], -- bounds area used (while building image)
renderMode: ATOM ← NIL, -- {$Bitmap, $Dithered, $PseudoColor, $Grey,
preferredRenderMode: ATOM ← NIL, -- $Dorado24, $FullColor }
alphaBuffer: BOOLEAN ← FALSE, -- buffer for matting and antialiasing
depthBuffer: BOOLEAN ← FALSE, -- buffer for cheap hidden-surface removal
lineDrawing: BOOLEAN ← FALSE, -- vector or shaded representation
depthResolution: NAT ← 8192, -- number of buckets for depth sorting
sortSequence: REF ← NIL, -- shapes or surfaces sorted for display
stopMe: BOOLEAN ← FALSE, -- stop flag for bailing out
suspendMe: BOOLEAN ← FALSE, -- flag for temporary halts (e.g. display changes)
halted: CONDITION, -- asserted after stop or suspend acted on
props: Atom.PropList ← NIL -- catchall
];