Trait rust_3d::traits::IsND
[−]
[src]
pub trait IsND {
fn n_dimensions() -> usize
where
Self: Sized;
fn get_position(&self, dimension: usize) -> Result<f64>;
}IsND is a trait used for types which are positioned within the n-dimensional space
Required Methods
fn n_dimensions() -> usize where
Self: Sized,
Self: Sized,
Should return the number of dimensions. E.g. 2 for points in 2D space, 3 for points in 3D space etc.
fn get_position(&self, dimension: usize) -> Result<f64>
Should return the value of a given dimensions. E.g. for 2D position with x = 4.3, y = 1.8 the result for dimension = 1 should be 1.8
Implementors
impl<P> IsND for Box<P> where
P: IsND,impl IsND for FilterBox2Dimpl IsND for FilterBox3Dimpl IsND for FilterCircleimpl IsND for FilterSphereimpl IsND for Point2Dimpl IsND for Point3Dimpl IsND for Norm2Dimpl IsND for Norm3Dimpl IsND for Circleimpl IsND for Box2Dimpl IsND for Sphereimpl IsND for Box3D