pub trait IsPointInside<V> {
// Required method
fn is_point_inside(&self, point: &V) -> bool;
}Expand description
Test whether a point is inside or outside a shape.
§Example
use hoomd_geometry::{IsPointInside, shape::Hypercuboid};
let cuboid = Hypercuboid {
edge_lengths: [6.0.try_into()?, 8.0.try_into()?],
};
assert!(cuboid.is_point_inside(&[2.5, -3.5].into()));
assert!(!cuboid.is_point_inside(&[4.0, -3.5].into()));Required Methods§
Sourcefn is_point_inside(&self, point: &V) -> bool
fn is_point_inside(&self, point: &V) -> bool
Check if a point is inside the shape.