Skip to main content

Module space

Module space 

Source
Expand description

Where a window’s scenes put their 3D layers: frames, spaces, doorways and what the eye sees. Where the scenes a window shows put their 3D layers, as one map that drawing, picking, window geometry and the eye’s walking all read.

Inside a scene, a layer takes its 3D frame from its parent’s: its place in the parent’s layout, turned into 3D on the parent’s plane. A mesh surface places its mesh in that frame and its children’s frames in its content; a 3D transform moves the frames beneath it; a scene opens a space of its own, behind a doorway at its node’s rect. The window’s eye stands in one of these spaces and sees the others through the doorways that show on screen, as deep as they show.

Structs§

Cell
A space a scene opens.
EyeView
Where the window’s eye stands, with its camera, and what it sees from there: the spaces it sees through doorways and their surfaces, all in the coordinates of the space it stands in.
Placed
A mesh surface placed in its space.
SeenDoor
A doorway as the eye sees through it.
SeenSpace
A space the eye sees.
SeenSurface
A surface the eye sees.
SpaceTree
The spaces of a window’s scene and the scenes behind its doorways, and their mesh surfaces, in the order the composition holds them.

Functions§

embed
A plane map of the frame’s plane z = 0 as a 3D map: z stays and distances along it scale as the plane’s do not.
for_each_window_eye
Visits the space tree of each scene the window shows from layer down, what its eye sees of it, and the map from the scene node’s own coordinates, its top left at the origin, to the window, given to_window for layer.
for_each_window_scene
Visits each scene the window shows from layer down: a layer that shows a scene outside every other scene’s space, with the map from its local space into the window, given to_window for layer.
node_size
The node size of a layer.
scene_of
The scene a layer shows, or None.