Skip to main content

ferroui_base/media/
geometry_hit_test_result.rs

1use crate::media::IntersectionResult;
2use crate::{Ref, Visual};
3
4/// Returns the results of a hit test that uses a geometry as a hit test parameter.
5#[derive(Clone, Debug, PartialEq, Eq, Hash)]
6pub struct GeometryHitTestResult {
7    /// The [`Visual`] that is returned from a hit test result.
8    pub visual_hit: Ref<Visual>,
9    /// The [`IntersectionResult`] value of the hit test.
10    pub intersection_result: IntersectionResult,
11}
12
13impl GeometryHitTestResult {
14    pub fn new(visual_hit: Ref<Visual>, intersection_result: IntersectionResult) -> Self {
15        Self { visual_hit, intersection_result }
16    }
17}