[][src]Struct voroxx::VoronoiCell

#[repr(C)]pub struct 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]

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]

impl Drop for VoronoiCell[src]

impl VoronoiCellBase for VoronoiCell[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.