[][src]Trait zvxryb_broadphase::TestGeometry

pub trait TestGeometry: Sized + Debug {
    type SubdivideResult: AsRef<[Self]>;
    type TestOrder: AsRef<[usize]>;
    fn subdivide(&self) -> Self::SubdivideResult;
fn test_order(&self) -> Self::TestOrder;
fn should_test(&self, nearest: f32) -> bool; }

A trait for implementing individual geometry tests

See Layer::test. This is a low-level interface and should generally not be directly implemented by users

Associated Types

Loading content...

Required methods

fn subdivide(&self) -> Self::SubdivideResult

Subdivide this geometry

This is required to return results in the same order as SpatialIndex::subdivide, both results will be reordered as given by test_order

fn test_order(&self) -> Self::TestOrder

The order in which to test cells

This is used to optimize tests where only the single, nearest, result should be returned

fn should_test(&self, nearest: f32) -> bool

Return whether this geometry is valid and non-empty

nearest may be std::f32::INFINITY

Loading content...

Implementors

impl TestGeometry for RayTestGeometry<Point2<f32>>[src]

type SubdivideResult = [Self; 4]

type TestOrder = [usize; 4]

impl TestGeometry for RayTestGeometry<Point3<f32>>[src]

type SubdivideResult = [Self; 8]

type TestOrder = [usize; 8]

Loading content...