[−][src]Struct voroxx::VoronoiCell
A single Voronoi cell, without neighbor information.
This class represents a single Voronoi cell, as a collection of vertices that are connected by edges. The class contains routines for initializing the Voronoi cell to be simple shapes such as a box, tetrahedron, or octahedron. It the contains routines for recomputing the cell based on cutting it by a plane, which forms the key routine for the Voronoi cell computation. It contains numerous routine for computing statistics about the Voronoi cell, and it can output the cell in several formats.
Use this class in cases when is not necessary to track the IDs of neighboring particles associated with each face of the Voronoi cell.
Implementations
impl VoronoiCell
[src]
pub fn init(xyz_min: &[f64; 3], xyz_max: &[f64; 3]) -> Self
[src]
Initializes the Voronoi cell to be an axis aligned rectangular box with the given dimensions.
Parameters:
xyz_min
The minimum coordinates.xyz_max
The maximum coordinates.
pub fn init_octahedron(l: f64) -> Self
[src]
Initializes the cell to be an octahedron with vertices at (l,0,0), (-l,0,0), (0,l,0), (0,-l,0), (0,0,l), and (0,0,-l).
Parameters:
l
a parameter setting the size of the octahedron.
pub fn init_tetrahedron(
v1: &[f64; 3],
v2: &[f64; 3],
v3: &[f64; 3],
v4: &[f64; 3]
) -> Self
[src]
v1: &[f64; 3],
v2: &[f64; 3],
v3: &[f64; 3],
v4: &[f64; 3]
) -> Self
Initializes the cell to be a tetrahedron.
Parameters:
v1
The coordinates (x,y,z) of the first vertex.v2
The coordinates (x,y,z) of the second vertex.v3
The coordinates (x,y,z) of the third vertex.v4
The coordinates (x,y,z) of the fourth vertex.
pub fn plane(&mut self, xyz: &[f64; 3]) -> bool
[src]
Cuts a Voronoi cell using by the plane corresponding to the perpendicular bisector between the particle and the origin.
Parameters:
(x
, y
, z
) The position of the particle.
Returns: False if the plane cut deleted the cell entirely, true otherwise.
Trait Implementations
impl Clone for VoronoiCell
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for VoronoiCell
[src]
impl VoronoiCellBase for VoronoiCell
[src]
pub fn number_of_faces(&self) -> i32
[src]
pub fn number_of_edges(&self) -> i32
[src]
pub fn number_of_vertices(&self) -> i32
[src]
pub fn translate(&mut self, xyz: &[f64; 3])
[src]
pub fn surface_area(&self) -> f64
[src]
pub fn volume(&self) -> f64
[src]
pub fn total_edge_distance(&self) -> f64
[src]
pub fn centroid(&self) -> [f64; 3]
[src]
pub fn vertices(&self) -> Vec<[f64; 3]>
[src]
pub fn face_areas(&self) -> Vec<f64>
[src]
pub fn face_perimeters(&self) -> Vec<f64>
[src]
pub fn face_vertices(&self) -> Vec<Vec<usize>>
[src]
pub fn normals(&self) -> Vec<[f64; 3]>
[src]
pub fn max_radius_squared(&self) -> f64
[src]
Auto Trait Implementations
impl RefUnwindSafe for VoronoiCell
impl !Send for VoronoiCell
impl !Sync for VoronoiCell
impl Unpin for VoronoiCell
impl UnwindSafe for VoronoiCell
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,