Struct TetMeshExt

Source
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>,
}
Expand description

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.

Implementations§

Source§

impl<T: Real> TetMeshExt<T>

Source§

impl<T: Real> TetMeshExt<T>

Source

pub fn merge_with_vertex_source<'a, I>( meshes: I, source_attrib: &str, ) -> Result<Self, Error>
where I: IntoIterator<Item = &'a Self>, I::IntoIter: Clone,

Merge a iterator of meshes into a single distinct mesh.

This version of merge accepts an attribute name for the source index on vertices.

The mesh vertices will be merged in the order given by the source attribute. This is useful when merging previously split up meshes. The source attribute needs to have type usize.

If the source attribute does not exist in at least one of the given meshes, then None is returned and the merge is aborted.

This is a non-destructive merge — both original meshes remain intact. This also means that this way of merging is somewhat more expensive than a merge without any source indices.

Source§

impl<T: Real> TetMeshExt<T>

Source

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

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.

Source

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

Source

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

Source

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

Source

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

Cell accessor. These are vertex indices.

Source

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

Return a slice of individual cells.

Source

pub fn tet_iter(&self) -> impl Iterator<Item = Tetrahedron<T>> + '_

Tetrahedron iterator.

Source

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

Get a tetrahedron primitive corresponding to the given vertex indices.

Source

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

Get a tetrahedron primitive corresponding to the given cell index.

Source

pub fn inverted(self) -> TetMeshExt<T>

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

Source

pub fn invert(&mut self)

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

Source

pub fn canonicalized(self) -> TetMeshExt<T>

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 meshx::ops::ShapeMatrix trait and the meshx::prim::tetrahedron module).

Source

pub fn canonicalize(&mut self)

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§

Source§

impl<T: Real> Attrib for TetMeshExt<T>

Source§

fn attrib_size<I: AttribIndex<Self>>(&self) -> usize

Get the size of the attribute at the appropriate mesh location determined by I.
Source§

fn attrib_dict<I: AttribIndex<Self>>(&self) -> &AttribDict<I>

Read only access to the attribute dictionary.
Source§

fn attrib_dict_mut<I: AttribIndex<Self>>(&mut self) -> &mut AttribDict<I>

Read and write access to the attribute dictionary.
Source§

fn attrib_dict_and_cache_mut<I: AttribIndex<Self>>( &mut self, ) -> (&mut AttribDict<I>, Option<&mut AttribValueCache>)

Read and write access to the attribute dictionary along with a cache for indirect attribute values.
Source§

fn insert_attrib_with_default<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<&mut Attribute<I>, Error>
where T: AttributeValue,

Insert an attribute at the appropriate location with a given default. Read more
Source§

fn insert_attrib_data<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, data: Vec<T>, ) -> Result<&mut Attribute<I>, Error>

Construct an attribute from a given data Vec<T>. data must have exactly the right size for the attribute to be inserted successfully. Read more
Source§

fn reset_attrib_to_default<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<&mut Attribute<I>, Error>
where T: AttributeValue,

Resets the attribute to the specified default value whether or not it already exists.
Source§

fn set_attrib_data<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, data: Vec<T>, ) -> Result<&mut Attribute<I>, Error>

Set an attribute to the given data vector. data must have exactly the right size for the attribute to be set successfully. Read more
Source§

fn insert_indirect_attrib<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>

Insert an indirect attribute at the appropriate location with a given default.
Source§

fn set_indirect_attrib<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>

Sets the indirect attribute to the specified default value whether or not it already exists.
Source§

fn insert_indirect_attrib_data<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, data: IndirectData, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>

Construct an indirect attribute from a given IndirectData. data must have exactly the right size for the attribute to be inserted successfully.
Source§

fn set_indirect_attrib_data<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, data: IndirectData, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>

Set an indirect attribute to the given IndirectData instance. data must have exactly the right size for the attribute to be set successfully.
Source§

fn duplicate_attrib<'a, 'b, T, I: AttribIndex<Self>>( &mut self, name: &'a str, new_name: &'b str, ) -> Result<&mut Attribute<I>, Error>
where T: Any + Clone,

Makes a copy of an existing attribute. Read more
Source§

fn remove_attrib<I: AttribIndex<Self>>( &mut self, name: &str, ) -> Result<Attribute<I>, Error>

Remove an attribute from the attribute dictionary. Read more
Source§

fn insert_attrib<I: AttribIndex<Self>>( &mut self, name: &str, attrib: Attribute<I>, ) -> Result<Option<Attribute<I>>, Error>

Inserts an attribute into the dictionary with the usual HashMap semantics. Read more
Source§

fn attrib_or_insert_with_default<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<&mut Attribute<I>, Error>
where T: AttributeValue,

Retrieve the attribute with the given name and if it doesn’t exist, insert a new one and set it to a given default value. In either case the mutable reference to the attribute is returned.
Source§

fn attrib_or_insert_data<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, data: &[T], ) -> Result<&mut Attribute<I>, Error>

Retrieve the attribute with the given name and if it doesn’t exist, set its data to what’s in the given slice. In either case the mutable reference to the attribute is returned.
Source§

fn attrib_or_insert_indirect<'a, T, I: AttribIndex<Self>>( &mut self, name: &'a str, def: T, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>

Retrieve the indirect attribute with the given name and if it doesn’t exist, insert a new one and set it to a given default value. In either case the mutable reference to the attribute is returned.
Source§

fn direct_attrib_iter<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<Iter<'b, T>, Error>
where T: Any + Clone,

Get the attribute iterator for a direct attribute.
Source§

fn attrib_iter_mut<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b mut self, name: &'a str, ) -> Result<IterMut<'b, T>, Error>
where T: Any + Clone,

Get the attribute mutable iterator for a direct attribute. Read more
Source§

fn attrib_iter<'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &str, ) -> Result<Box<dyn Iterator<Item = &'b T> + 'b>, Error>
where T: Any + Clone,

Get the iterator for an attribute no matter what kind. Read more
Source§

fn indirect_attrib_update_with<'a, 'b, T, I, F>( &'b mut self, name: &'a str, f: F, ) -> Result<(&'b mut Attribute<I>, &'b mut AttribValueCache), Error>
where T: AttributeValueHash, I: 'b + AttribIndex<Self>, F: FnMut(usize, &Irc<T>) -> Option<Irc<T>>,

Update indirect attribute entries with the given closure. Read more
Source§

fn attrib_exists<I: AttribIndex<Self>>(&self, name: &str) -> bool

Return true if the given attribute exists at the given location, and false otherwise, even if the specified attribute location is invalid for the mesh.
Source§

fn attrib_check<'a, T: Any, I: AttribIndex<Self>>( &self, name: &'a str, ) -> Result<&Attribute<I>, Error>

Determine if the given attribute is valid and exists at the given location. Read more
Source§

fn attrib_as_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<&'b [T], Error>

Expose the underlying direct attribute as a slice. Read more
Source§

fn attrib_as_mut_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>( &'b mut self, name: &'a str, ) -> Result<&'b mut [T], Error>

Expose the underlying direct attribute as a mutable slice. Read more
Source§

fn attrib_clone_into_vec<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<Vec<T>, Error>

Clone attribute data into a Vec<T>. Read more
Source§

fn direct_attrib_clone_into_vec<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<Vec<T>, Error>
where T: AttributeValue,

Clone direct attribute data into a Vec<T>. Read more
Source§

fn attrib<'a, I: AttribIndex<Self>>( &self, name: &'a str, ) -> Result<&Attribute<I>, Error>

Borrow the raw attribute from the attribute dictionary. Read more
Source§

fn attrib_mut<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, ) -> Result<&mut Attribute<I>, Error>

Get the raw mutable attribute from the attribute dictionary. Read more
Source§

impl<T: Real> CellAttrib for TetMeshExt<T>

Source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
Source§

fn topo_attrib_dict(&self) -> &AttribDict<CellIndex>

Mesh implementation of the attribute dictionary getter.
Source§

fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellIndex>

Mesh implementation of the attribute dictionary mutable getter.
Source§

fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellIndex>, Option<&mut AttribValueCache>)

Mesh implementation of the attribute dictionary and cache mutable getter.
Source§

impl<T: Real> CellFace for TetMeshExt<T>

Source§

fn face<CFI>(&self, cf_idx: CFI) -> FaceIndex
where CFI: Copy + Into<CellFaceIndex>,

Index of the destination element given the topology index.
Source§

fn cell_face<CI>(&self, cidx: CI, which: usize) -> Option<CellFaceIndex>
where CI: Copy + Into<CellIndex>,

Toplogy index: where the data lives in an attribute array.
Source§

fn num_cell_faces(&self) -> usize

Topology quantifier. Number of connectors in total.
Source§

fn num_faces_at_cell<CI>(&self, cidx: CI) -> usize
where CI: Copy + Into<CellIndex>,

Topology quantifier. Number of connectors at a particular element.
Source§

fn cell_to_face<I>(&self, i: I, k: usize) -> Option<FaceIndex>
where I: Copy + Into<CellIndex>,

Index of the destination element from the source index.
Source§

impl<T: Real> CellFaceAttrib for TetMeshExt<T>

Source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
Source§

fn topo_attrib_dict(&self) -> &AttribDict<CellFaceIndex>

Mesh implementation of the attribute dictionary getter.
Source§

fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellFaceIndex>

Mesh implementation of the attribute dictionary mutable getter.
Source§

fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellFaceIndex>, Option<&mut AttribValueCache>)

Mesh implementation of the attribute dictionary and cache mutable getter.
Source§

impl<T: Real> CellVertex for TetMeshExt<T>

Source§

fn vertex<CVI>(&self, cv_idx: CVI) -> VertexIndex
where CVI: Copy + Into<CellVertexIndex>,

Index of the destination element given the topology index.
Source§

fn cell_vertex<CI>(&self, cidx: CI, which: usize) -> Option<CellVertexIndex>
where CI: Copy + Into<CellIndex>,

Toplogy index: where the data lives in an attribute array.
Source§

fn num_cell_vertices(&self) -> usize

Topology quantifier. Number of connectors in total.
Source§

fn num_vertices_at_cell<CI>(&self, cidx: CI) -> usize
where CI: Copy + Into<CellIndex>,

Topology quantifier. Number of connectors at a particular element.
Source§

fn cell_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex>
where I: Copy + Into<CellIndex>,

Index of the destination element from the source index.
Source§

fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)
where Self: NumCells + NumVertices,

Generate the reverse topology structure.
Source§

fn reverse_source_topo(&self) -> (Vec<usize>, Vec<usize>)
where Self: NumVertices,

Generate the reverse topology structure from the destination element to the source topology element. Read more
Source§

impl<T: Real> CellVertexAttrib for TetMeshExt<T>

Source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
Source§

fn topo_attrib_dict(&self) -> &AttribDict<CellVertexIndex>

Mesh implementation of the attribute dictionary getter.
Source§

fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellVertexIndex>

Mesh implementation of the attribute dictionary mutable getter.
Source§

fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellVertexIndex>, Option<&mut AttribValueCache>)

Mesh implementation of the attribute dictionary and cache mutable getter.
Source§

impl<T: Clone + Real> Clone for TetMeshExt<T>

Source§

fn clone(&self) -> TetMeshExt<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Real> Debug for TetMeshExt<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Real> Default for TetMeshExt<T>

Source§

fn default() -> Self

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.

Source§

impl<T: Real> From<TetMesh<T>> for TetMeshExt<T>

Source§

fn from(tetmesh: TetMesh<T>) -> TetMeshExt<T>

Converts to this type from the input type.
Source§

impl<T: Real> From<TetMeshExt<T>> for TetMesh<T>

Source§

fn from(ext: TetMeshExt<T>) -> TetMesh<T>

Converts to this type from the input type.
Source§

impl<T: Real> Merge for TetMeshExt<T>

Source§

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

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

Source§

fn merge_iter(iterable: impl IntoIterator<Item = Self>) -> Self
where Self: Default,

Merge an iterator of objects into one of the same type.
Source§

fn merge_vec(vec: Vec<Self>) -> Self
where Self: Default,

Merge a Vec of objects into one of the same type.
Source§

fn merge_slice(slice: &[Self]) -> Self
where Self: Clone + Default,

In contrast to merge_vec, this function takes an immutable reference to a collection of meshes, and creates a brand new mesh that is a union of all the given meshes.
Source§

impl<T: Real> NumCells for TetMeshExt<T>

Source§

impl<T: Real> NumVertices for TetMeshExt<T>

Define TetMeshExt topology

Source§

impl<T: PartialEq + Real> PartialEq for TetMeshExt<T>

Source§

fn eq(&self, other: &TetMeshExt<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Real> Split<VertexIndex> for TetMeshExt<T>

Source§

fn split(self, vertex_partition: &[usize], num_parts: usize) -> Vec<Self>

Source§

fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>
where Self: Attrib, Src: AttribIndex<Self>,

Split the mesh using a given attribute whose type implements Hash and Eq. Read more
Source§

fn split_by_attrib_ord<T: PartialOrd + AttributeValue>( self, attrib: &str, ) -> Vec<Self>
where Self: Attrib, Src: AttribIndex<Self>,

Split the mesh using a given attribute whose type implements PartialOrd. Read more
Source§

impl<T: Real> SplitIntoConnectedComponents<VertexIndex, CellIndex> for TetMeshExt<T>

Source§

impl<T: Real> VertexAttrib for TetMeshExt<T>

Source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
Source§

fn topo_attrib_dict(&self) -> &AttribDict<VertexIndex>

Mesh implementation of the attribute dictionary getter.
Source§

fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexIndex>

Mesh implementation of the attribute dictionary mutable getter.
Source§

fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<VertexIndex>, Option<&mut AttribValueCache>)

Mesh implementation of the attribute dictionary and cache mutable getter.
Source§

impl<T: Real> VertexCell for TetMeshExt<T>

Source§

fn cell<VCI>(&self, vc_idx: VCI) -> CellIndex
where VCI: Copy + Into<VertexCellIndex>,

Index of the destination element given the topology index.
Source§

fn vertex_cell<VI>(&self, vidx: VI, which: usize) -> Option<VertexCellIndex>
where VI: Copy + Into<VertexIndex>,

Toplogy index: where the data lives in an attribute array.
Source§

fn num_vertex_cells(&self) -> usize

Topology quantifier. Number of connectors in total.
Source§

fn num_cells_at_vertex<VI>(&self, vidx: VI) -> usize
where VI: Copy + Into<VertexIndex>,

Topology quantifier. Number of connectors at a particular element.
Source§

fn vertex_to_cell<I>(&self, i: I, k: usize) -> Option<CellIndex>
where I: Copy + Into<VertexIndex>,

Index of the destination element from the source index.
Source§

impl<T: Real> VertexCellAttrib for TetMeshExt<T>

Source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
Source§

fn topo_attrib_dict(&self) -> &AttribDict<VertexCellIndex>

Mesh implementation of the attribute dictionary getter.
Source§

fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexCellIndex>

Mesh implementation of the attribute dictionary mutable getter.
Source§

fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<VertexCellIndex>, Option<&mut AttribValueCache>)

Mesh implementation of the attribute dictionary and cache mutable getter.
Source§

impl<T: Real> VertexPositions for TetMeshExt<T>

Source§

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

Source§

fn vertex_positions(&self) -> &[Self::Element]

Vertex positions as a slice of triplets.
Source§

fn vertex_positions_mut(&mut self) -> &mut [Self::Element]

Vertex positions as a mutable slice of triplets.
Source§

fn vertex_position_iter(&self) -> Iter<'_, Self::Element>

Vertex iterator.
Source§

fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>

Mutable vertex iterator.
Source§

fn vertex_position<VI>(&self, vidx: VI) -> Self::Element
where VI: Into<VertexIndex>, Self::Element: Clone,

Vertex accessor.
Source§

impl<T: Real> StructuralPartialEq for TetMeshExt<T>

Auto Trait Implementations§

§

impl<T> Freeze for TetMeshExt<T>

§

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

§

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,

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<M, T> BoundingBox<T> for M
where T: Real, M: VertexPositions<Element = [T; 3]>,

Source§

fn bounding_box(&self) -> BBox<T>

Compute the bounding box of this object.

Source§

impl<T> Bytes for T

Source§

fn as_bytes(&self) -> &[u8]

Get a slice of bytes representing Self.
Source§

fn interpret_bytes(bytes: &[u8]) -> &Self

Panics if the size of the given bytes slice is not equal to the size of Self.
Source§

impl<T> CloneBytes for T
where T: Clone + 'static,

Source§

unsafe fn clone_bytes(src: &[MaybeUninit<u8>]) -> Box<[MaybeUninit<u8>]>

Source§

unsafe fn clone_from_bytes(dst: &mut [MaybeUninit<u8>], src: &[MaybeUninit<u8>])

Source§

unsafe fn clone_into_raw_bytes( src: &[MaybeUninit<u8>], dst: &mut [MaybeUninit<u8>], )

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<M> Connectivity<VertexIndex, CellIndex> for M

Source§

type Topo = ()

Additional topology that may aid in computing connectivity. Read more
Source§

fn num_elements(&self) -> usize

Get the number of elements which are considered for connectivity Read more
Source§

fn push_neighbours<T>( &self, index: VertexIndex, stack: &mut Vec<VertexIndex>, _: &(), _: Option<&[T]>, )
where T: Default + PartialEq,

Push all neighbours of the element at the given index to the given stack. Read more
Source§

fn precompute_topo(&self) -> Self::Topo

Precompute additional topology information prior to determining connectivity. Read more
Source§

fn connectivity(&self) -> (Vec<usize>, usize)

Determine the connectivity of a set of meshes. Read more
Source§

fn connectivity_via_attrib<T>( &self, attrib: Option<&str>, ) -> (Vec<usize>, usize)
where Self: Attrib, Src: AttribIndex<Self>, T: Default + PartialEq + 'static,

Determine the connectivity of a set of meshes. Read more
Source§

fn connectivity_via_attrib_fn<'a, T, F>(&self, f: F) -> (Vec<usize>, usize)
where T: Default + PartialEq + 'a, F: FnOnce() -> Option<&'a [T]>,

Determine the connectivity of a set of meshes. Read more
Source§

impl<T> DebugBytes for T
where T: Debug + 'static,

Source§

unsafe fn fmt_bytes( bytes: &[MaybeUninit<u8>], f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DropBytes for T
where T: 'static,

Source§

unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, S, I> Get<'a, I> for S
where I: GetIndex<'a, S>,

Source§

type Output = <I as GetIndex<'a, S>>::Output

Source§

fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>

Source§

fn at(&self, idx: I) -> Self::Output

Return a value at the given index. This is provided as the checked version of get that will panic if the equivalent get call is None, which typically means that the given index is out of bounds. Read more
Source§

unsafe fn at_unchecked(&self, idx: I) -> Self::Output

Return a value at the given index. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<S, I> Isolate<I> for S
where I: IsolateIndex<S>,

Source§

type Output = <I as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output

Unchecked version of isolate. Read more
Source§

fn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>

Source§

fn isolate(self, idx: I) -> Self::Output
where Self: Sized,

Return a value at the given index. This is provided as the checked version of try_isolate that will panic if the equivalent try_isolate call is None, which typically means that the given index is out of bounds. Read more
Source§

impl<T> PartialEqBytes for T
where T: PartialEq + 'static,

Source§

unsafe fn eq_bytes(a: &[MaybeUninit<u8>], b: &[MaybeUninit<u8>]) -> bool

Source§

impl<M> Partition for M
where M: Attrib,

Source§

fn partition_by_attrib<T, Src>(&self, attrib: &str) -> (Vec<usize>, usize)
where T: AttributeValueHash, Src: AttribIndex<M>,

Returns a partitioning by unique values of the given attribute. Read more
Source§

fn partition_by_attrib_by_sort<T, Src>( &self, attrib: &str, ) -> (Vec<usize>, usize)

Returns a partitioning by unique values of the given attribute. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, N> PushArrayToVec<N> for T
where T: Clone, N: Array<T>,

Source§

fn push_to_vec(element: <N as Array<T>>::Array, set: &mut Vec<T>)

This method tells this type how it can be pushed to a Vec as an array.
Source§

impl<T, M> Rotate<T> for M
where T: RealField + Float, M: VertexPositions<Element = [T; 3]>,

Source§

fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])

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

Source§

fn rotate(&mut self, axis: [T; 3], theta: T)

Rotate the object around the given unit vector u by the given angle theta (in radians). Read more
Source§

fn rotate_by_vector(&mut self, e: [T; 3])
where T: Zero,

Rotate the object using the given Euler vector (or rotation vector) e. The direction of e specifies the axis of rotation and its magnitude is the angle in radians.
Source§

impl<S, T> Rotated<T> for S
where T: RealField, S: Rotate<T>,

Source§

fn rotated(self, u: [T; 3], theta: T) -> S

Return a version of self rotated about the unit vector u by the given angle theta (in radians). Read more
Source§

fn rotated_by_matrix(self, mtx: [[T; 3]; 3]) -> S

Return a version of self rotated using the given column-major rotation matrix
Source§

fn rotated_by_vector(self, e: [T; 3]) -> S

Return a version of self rotated about the Euler vector e.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

fn scale(&mut self, _: [T; 3])

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

Source§

fn uniform_scale(&mut self, s: T)

Uniformly scale the given object by the given factor in all dimensions.
Source§

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

Source§

fn scaled(self, s: [T; 3]) -> S

Return a scaled version of self.
Source§

fn uniformly_scaled(self, s: T) -> S

Return a uniformly scaled version of self.
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

fn translate(&mut self, _: [T; 3])

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

Source§

impl<S, T> Translated<T> for S
where S: Translate<T>,

Source§

fn translated(self, t: [T; 3]) -> S

Return a version of self translated by the given translation vector t.
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.
Source§

impl<T> AttributeValue for T
where T: Clone + PartialEq + Debug + Send + Sync + 'static,

Source§

impl<T> Elem for T
where T: Any + DropBytes,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<M, T> VertexMesh<T> for M