[][src]Struct gut::mesh::tetmesh::TetMeshExt

pub struct TetMeshExt<T: Real> {
    pub tetmesh: TetMesh<T>,
    pub cell_indices: Vec<usize>,
    pub cell_offsets: Vec<usize>,
    pub vertex_cell_attributes: AttribDict<VertexCellIndex>,
}

Mesh composed of tetrahedra, extended with its dual voronoi topology.

Fields

tetmesh: TetMesh<T>cell_indices: Vec<usize>

Lists of cell indices for each vertex. Since each vertex can have a variable number of cell neighbours, the cell_offsets field keeps track of where each subarray of indices begins.

cell_offsets: Vec<usize>

Offsets into the cell_indices array, one for each vertex. The last offset is always equal to the size of cell_indices for convenience.

vertex_cell_attributes: AttribDict<VertexCellIndex>

Vertex cell Attributes.

Methods

impl<T: Real> TetMeshExt<T>[src]

pub const TET_FACES: [[usize; 3]; 4][src]

This constant defines the triangle faces of each tet. The rule is that ith face of the tet is the one opposite to the ith vertex. The triangle starts with the smallest index.

pub fn new(verts: Vec<[T; 3]>, indices: Vec<usize>) -> TetMeshExt<T>[src]

pub fn cell_iter(&self) -> Iter<[usize; 4]>[src]

pub fn cell_iter_mut(&mut self) -> IterMut<[usize; 4]>[src]

pub fn cell<CI: Into<CellIndex>>(&self, cidx: CI) -> &[usize; 4][src]

Cell accessor. These are vertex indices.

pub fn cells(&self) -> &[[usize; 4]][src]

Return a slice of individual cells.

pub fn tet_iter<'a>(&'a self) -> impl Iterator<Item = Tetrahedron<T>> + 'a[src]

Tetrahedron iterator.

pub fn tet_from_indices(&self, indices: &[usize; 4]) -> Tetrahedron<T>[src]

Get a tetrahedron primitive corresponding to the given vertex indices.

pub fn tet<CI: Into<CellIndex>>(&self, cidx: CI) -> Tetrahedron<T>[src]

Get a tetrahedron primitive corresponding to the given cell index.

pub fn inverted(self) -> TetMeshExt<T>[src]

Consumes the current mesh to produce a mesh with inverted tetrahedra.

pub fn invert(&mut self)[src]

Non consuming verion of the inverted function which simply modifies the given mesh.

pub fn canonicalized(self) -> TetMeshExt<T>[src]

Convert this mesh into canonical form. This function inverts any inverted tetrahedron such that all tetrahedra are in canonical (non-inverted) form. The canonical form is determined by the shape matrix determinant of each tetrahedron. Canonical tetrahedra have a positive shape matrix determinant (see the gut::ops::ShapeMatrix trait and the gut::prim::tetrahedron module).

pub fn canonicalize(&mut self)[src]

Convert this mesh into canonical form. This function inverts any inverted tetrahedron such that all tetrahedra are in canonical (non-inverted) form. This is a non-consuming version of canonicalized.

Trait Implementations

impl<T: Real> SplitIntoConnectedComponents<VertexCellIndex> for TetMeshExt<T>[src]

impl<T: Real> Merge for TetMeshExt<T>[src]

fn merge(&mut self, other: Self) -> &mut Self[src]

Attributes with the same name but different types won't be merged.

impl<T: Real> NumVertices for TetMeshExt<T>[src]

Define TetMeshExt topology

impl<T: Real> NumCells for TetMeshExt<T>[src]

impl<T: Real> Attrib for TetMeshExt<T>[src]

impl<T: Real> VertexPositions for TetMeshExt<T>[src]

type Element = <TetMesh<T> as VertexPositions>::Element

impl<T: Real> CellVertex for TetMeshExt<T>[src]

impl<T: Real> CellFace for TetMeshExt<T>[src]

impl<T: Real> VertexCell for TetMeshExt<T>[src]

impl<T: Real> VertexAttrib for TetMeshExt<T>[src]

impl<T: Real> CellAttrib for TetMeshExt<T>[src]

impl<T: Real> CellVertexAttrib for TetMeshExt<T>[src]

impl<T: Real> CellFaceAttrib for TetMeshExt<T>[src]

impl<T: Real> VertexCellAttrib for TetMeshExt<T>[src]

impl<T: Real> From<TetMesh<T>> for TetMeshExt<T>[src]

impl<T: Real> From<TetMeshExt<T>> for TetMesh<T>[src]

impl<T: Clone + Real> Clone for TetMeshExt<T>[src]

impl<T: Real> Default for TetMeshExt<T>[src]

fn default() -> Self[src]

Produce an empty TetMeshExt. This is not particularly useful on its own, however it can be used as a null case for various mesh algorithms.

impl<T: PartialEq + Real> PartialEq<TetMeshExt<T>> for TetMeshExt<T>[src]

impl<T: Debug + Real> Debug for TetMeshExt<T>[src]

impl<T: Real> StructuralPartialEq for TetMeshExt<T>[src]

Auto Trait Implementations

impl<T> Send for TetMeshExt<T>

impl<T> Sync for TetMeshExt<T>

impl<T> Unpin for TetMeshExt<T> where
    T: Unpin

impl<T> UnwindSafe for TetMeshExt<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for TetMeshExt<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, M> Scale<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn scale(&mut Self, [T; 3])[src]

Scale a mesh in 3D by a given vector of scale factors. s = [1.0; 3] corresponds to a noop.

impl<T, M> Rotate<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn rotate_by_matrix(&mut Self, [[T; 3]; 3])[src]

Rotate the mesh using the given column-major rotation matrix.

impl<T, M> Translate<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn translate(&mut Self, [T; 3])[src]

Translate the mesh by the given translation vector (displacement) t.

impl<S, T> Scaled<T> for S where
    S: Scale<T>,
    T: Copy
[src]

impl<S, T> Rotated<T> for S where
    S: Rotate<T>,
    T: BaseFloat
[src]

impl<S, T> Translated<T> for S where
    S: Translate<T>, 
[src]

impl<M, T> BoundingBox<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: Real
[src]

fn bounding_box(&Self) -> BBox<T>[src]

Compute the bounding box of this object.

impl<M> Connectivity<VertexCellIndex> for M where
    M: NumVertices + CellVertex + VertexCell
[src]

impl<T> Bytes for T[src]

impl<M, T> VertexMesh<T> for M where
    M: Attrib + VertexAttrib + NumVertices + VertexPositions<Element = [T; 3]>,
    T: Real
[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 = !

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.

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

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

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