pub struct EyeView<'a> {
pub camera: Camera,
pub size: Size,
pub cell: usize,
pub seen: Vec<SeenSpace>,
pub surfaces: Vec<SeenSurface<'a>>,
}Expand description
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.
Fields§
§camera: CameraThe eye’s camera.
size: SizeThe window scene node’s size, which the camera fills.
cell: usizeThe space the eye stands in, by its number in the tree.
seen: Vec<SeenSpace>The spaces the eye sees: its own first, then each through the doorway it shows through, before the spaces seen through it.
surfaces: Vec<SeenSurface<'a>>The surfaces of the spaces it sees, in draw order.
Implementations§
Source§impl<'a> EyeView<'a>
impl<'a> EyeView<'a>
Sourcepub fn of(tree: &SpaceTree<'a>, size: Size) -> Self
pub fn of(tree: &SpaceTree<'a>, size: Size) -> Self
What the window’s eye sees of tree, the scene of a node of size:
it stands where the window scene’s Scene3d::eye says, and sees
through each doorway whose opening shows on screen.
Sourcepub fn build_world(&self, tree: &SpaceTree<'_>, world: &mut EyeWorld)
pub fn build_world(&self, tree: &SpaceTree<'_>, world: &mut EyeWorld)
Fills world with what the eye can bump into and walk through: the
space it stands in, the spaces one doorway from it, their solid
surfaces and the doorways between them, in the eye’s space.
Source§impl EyeView<'_>
impl EyeView<'_>
Sourcepub fn content_to_window(
&self,
seen: &SeenSurface<'_>,
to_window: ProjectiveTransform,
) -> Option<ProjectiveTransform>
pub fn content_to_window( &self, seen: &SeenSurface<'_>, to_window: ProjectiveTransform, ) -> Option<ProjectiveTransform>
The map from the content of seen surface seen to the window, as the
eye shows it, given to_window for the scene node’s own coordinates;
None for a surface whose mesh carries no texture plane.