Skip to main content

Mesh

Struct Mesh 

Source
pub struct Mesh<const D: usize> { /* private fields */ }

Implementations§

Source§

impl Mesh<3>

Source

pub fn normals(&self) -> TensorRank1Vec2D<3, 0>

Source§

impl<const D: usize> Mesh<D>

Source

pub fn exterior_faces(&self) -> Vec<Vec<usize>>

Source

pub fn bounding_boxes(&self) -> BoundingBoxes<D>

Source

pub fn centroids(&self) -> Coordinates<D>

Source

pub fn bounding_boxes_and_centroids( &self, ) -> impl Iterator<Item = (BoundingBox<D>, Coordinate<D>)>

Source

pub fn blocks(&self) -> Option<&[usize]>

Source

pub fn connectivities(&self) -> &[Connectivity]

Source

pub fn node_sets(&self) -> &[Vec<usize>]

Source

pub fn node_set_numbers(&self) -> Option<&[usize]>

Source

pub fn set_node_sets(&mut self, node_sets: NodeSets)

Source

pub fn side_sets(&self) -> &[Vec<(usize, usize)>]

Source

pub fn side_set_numbers(&self) -> Option<&[usize]>

Source

pub fn set_side_sets(&mut self, side_sets: SideSets)

Source

pub fn iter(&self) -> impl Iterator<Item = &Connectivity>

Source

pub fn coordinates(&self) -> &Coordinates<D>

Source

pub fn node_element_connectivity(&self) -> &[Vec<usize>]

Source

pub fn node_nodes(&self) -> &Graph

Source

pub fn node_node_connectivity(&self) -> &[Vec<usize>]

Source

pub fn number_of_element_blocks(&self) -> usize

Source

pub fn number_of_face_blocks(&self) -> Option<usize>

Source

pub fn number_of_elements(&self) -> usize

Source

pub fn number_of_faces(&self) -> Option<usize>

Source

pub fn number_of_nodes(&self) -> usize

Source§

impl<const D: usize> Mesh<D>

Source

pub fn laplacian(&self, weighting: Weighting) -> Coordinates<D>

Source§

impl Mesh<2>

Source

pub fn from_pixels<T>(pixels: Pixels<T>, remove: Option<&[T]>) -> Self
where T: Copy + PartialEq + Into<usize>,

Source§

impl Mesh<3>

Source

pub fn from_segmentation<T>( segmentation: Segmentation<3, T>, remove: Option<&[T]>, ) -> Self
where T: Copy + PartialEq + Into<usize>,

Source§

impl Mesh<3>

Source

pub fn from_voxels<T>(voxels: Voxels<T>, remove: Option<&[T]>) -> Self
where T: Copy + PartialEq + Into<usize>,

Source§

impl<const D: usize> Mesh<D>

Source

pub fn smart_laplace_smooth(&mut self, iterations: usize, scale: Scalar)

Source§

impl<const D: usize> Mesh<D>

Source

pub fn untangle( &mut self, iterations: usize, margin: Scalar, surface: Option<&Tessellation>, )

Source§

impl Mesh<D>

Source

pub fn self_intersections(&self) -> Vec<[usize; 2]>

Source§

impl<const D: usize> Mesh<D>

Source

pub fn boundary_edges(&self) -> Vec<[usize; 2]>

Source

pub fn boundary_loops(&self) -> Vec<Vec<usize>>

Source

pub fn non_manifold_edges(&self) -> Vec<[usize; 2]>

Source

pub fn non_manifold_seams(&self) -> Vec<Vec<[usize; 2]>>

Source

pub fn non_manifold_vertices(&self) -> Vec<usize>

Source§

impl Mesh<D>

Source

pub fn remesh(self, remeshing: Remeshing) -> Result<Self, &'static str>

Source§

impl<const D: usize> Mesh<D>

Source

pub fn laplace_smooth( &mut self, iterations: usize, scale: Scalar, weighting: Weighting, preserve_boundary: bool, preserve_interfaces: bool, )

Source§

impl<const D: usize> Mesh<D>

Source

pub fn taubin_smooth( &mut self, iterations: usize, pass_band: Scalar, scale: Scalar, weighting: Weighting, preserve_boundary: bool, preserve_interfaces: bool, )

Source§

impl<const D: usize> Mesh<D>

Source

pub fn smooth(&mut self, smoothing: Smoothing)

Trait Implementations§

Source§

impl<const D: usize> From<&Mesh<D>> for BoundingVolumeHierarchy<D>

Source§

fn from(mesh: &Mesh<D>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> From<&Mesh<D>> for Vec<Primitive<D>>

Source§

fn from(mesh: &Mesh<D>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> From<(Set<Vec<Connectivity>>, Set<TensorVector<TensorRank1<D, 0>>>)> for Mesh<D>

Source§

fn from( (connectivities, coordinates): (Connectivities, Set<Coordinates<D>>), ) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> From<(Vec<Connectivity>, TensorVector<TensorRank1<D, 0>>)> for Mesh<D>

Source§

fn from( (connectivities, coordinates): (Vec<Connectivity>, Coordinates<D>), ) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> From<Mesh<D>> for (Connectivities, Coordinates<D>)

Source§

fn from(mesh: Mesh<D>) -> Self

Converts to this type from the input type.
Source§

impl From<Mesh<D>> for Tessellation

Source§

fn from(mesh: Mesh<D>) -> Self

Converts to this type from the input type.
Source§

impl From<Tessellation> for Mesh<D>

Source§

fn from(tessellation: Tessellation) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize> IntoIterator for Mesh<D>

Source§

type Item = Connectivity

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<Connectivity>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<const D: usize, P> TryFrom<Input<P>> for Mesh<D>
where P: AsRef<Path>,

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(input: Input<P>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const D: usize> Verdict for Mesh<D>

Source§

impl<const D: usize, P> Write<Output<P>> for Mesh<D>
where P: AsRef<Path>,

Source§

type Error = Error

Source§

fn write(&self, output: Output<P>) -> Result<(), Self::Error>

Auto Trait Implementations§

§

impl<const D: usize> !Freeze for Mesh<D>

§

impl<const D: usize> !RefUnwindSafe for Mesh<D>

§

impl<const D: usize> Send for Mesh<D>

§

impl<const D: usize> !Sync for Mesh<D>

§

impl<const D: usize> Unpin for Mesh<D>

§

impl<const D: usize> UnsafeUnpin for Mesh<D>

§

impl<const D: usize> UnwindSafe for Mesh<D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.