Skip to main content

HitGraphSink

Trait HitGraphSink 

Source
pub trait HitGraphSink {
    // Required method
    fn push_hit(
        &mut self,
        node_id: NodeId,
        capture_path: &[NodeId],
        geometry: HitGeometry<'_>,
        hit: &HitTestNode,
    );

    // Provided method
    fn surface_holds(&self) -> Option<&SurfaceHolds> { ... }
}
Expand description

Receives the hit targets that collect_hits_from_graph finds in a scene.

Required Methods§

Source

fn push_hit( &mut self, node_id: NodeId, capture_path: &[NodeId], geometry: HitGeometry<'_>, hit: &HitTestNode, )

Records an interactive node. capture_path lists the node first and then its pointer-input ancestors from the nearest outward, and geometry is in window space.

Provided Methods§

Source

fn surface_holds(&self) -> Option<&SurfaceHolds>

Where the gestures on mesh surfaces keep the meshes they hold from one collection of the targets to the next; None for a sink that sends no gestures, where each scene’s pick keeps its own.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§