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>
impl<T: Real> TetMeshExt<T>
pub fn vertex_connectivity(&self) -> (Vec<usize>, usize)
Source§impl<T: Real> TetMeshExt<T>
impl<T: Real> TetMeshExt<T>
Sourcepub fn merge_with_vertex_source<'a, I>(
meshes: I,
source_attrib: &str,
) -> Result<Self, Error>
pub fn merge_with_vertex_source<'a, I>( meshes: I, source_attrib: &str, ) -> Result<Self, Error>
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>
impl<T: Real> TetMeshExt<T>
Sourcepub const TET_FACES: [[usize; 3]; 4]
pub const TET_FACES: [[usize; 3]; 4]
This constant defines the triangle faces of each tet. The rule is that i
th face of the
tet is the one opposite to the i
th vertex. The triangle starts with the smallest index.
pub fn new(verts: Vec<[T; 3]>, indices: Vec<[usize; 4]>) -> TetMeshExt<T>
pub fn cell_iter(&self) -> Iter<'_, [usize; 4]>
pub fn cell_iter_mut(&mut self) -> IterMut<'_, [usize; 4]>
Sourcepub fn cell<CI: Into<CellIndex>>(&self, cidx: CI) -> &[usize; 4]
pub fn cell<CI: Into<CellIndex>>(&self, cidx: CI) -> &[usize; 4]
Cell accessor. These are vertex indices.
Sourcepub fn tet_iter(&self) -> impl Iterator<Item = Tetrahedron<T>> + '_
pub fn tet_iter(&self) -> impl Iterator<Item = Tetrahedron<T>> + '_
Tetrahedron iterator.
Sourcepub fn tet_from_indices(&self, indices: &[usize; 4]) -> Tetrahedron<T>
pub fn tet_from_indices(&self, indices: &[usize; 4]) -> Tetrahedron<T>
Get a tetrahedron primitive corresponding to the given vertex indices.
Sourcepub fn tet<CI: Into<CellIndex>>(&self, cidx: CI) -> Tetrahedron<T>
pub fn tet<CI: Into<CellIndex>>(&self, cidx: CI) -> Tetrahedron<T>
Get a tetrahedron primitive corresponding to the given cell index.
Sourcepub fn inverted(self) -> TetMeshExt<T>
pub fn inverted(self) -> TetMeshExt<T>
Consumes the current mesh to produce a mesh with inverted tetrahedra.
Sourcepub fn invert(&mut self)
pub fn invert(&mut self)
Non consuming verion of the inverted
function which simply modifies the given mesh.
Sourcepub fn canonicalized(self) -> TetMeshExt<T>
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).
Sourcepub fn canonicalize(&mut self)
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>
impl<T: Real> Attrib for TetMeshExt<T>
Source§fn attrib_size<I: AttribIndex<Self>>(&self) -> usize
fn attrib_size<I: AttribIndex<Self>>(&self) -> usize
I
.Source§fn attrib_dict<I: AttribIndex<Self>>(&self) -> &AttribDict<I>
fn attrib_dict<I: AttribIndex<Self>>(&self) -> &AttribDict<I>
Source§fn attrib_dict_mut<I: AttribIndex<Self>>(&mut self) -> &mut AttribDict<I>
fn attrib_dict_mut<I: AttribIndex<Self>>(&mut self) -> &mut AttribDict<I>
Source§fn attrib_dict_and_cache_mut<I: AttribIndex<Self>>(
&mut self,
) -> (&mut AttribDict<I>, Option<&mut AttribValueCache>)
fn attrib_dict_and_cache_mut<I: AttribIndex<Self>>( &mut self, ) -> (&mut AttribDict<I>, Option<&mut AttribValueCache>)
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,
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,
Source§fn insert_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: Vec<T>,
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
fn insert_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: Vec<T>,
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
Vec<T>
. data
must have
exactly the right size for the attribute to be inserted successfully. Read moreSource§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,
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,
Source§fn set_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: Vec<T>,
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
fn set_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: Vec<T>,
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
data
must have exactly the
right size for the attribute to be set successfully. Read moreSource§fn insert_indirect_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>where
T: AttributeValueHash,
fn insert_indirect_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>where
T: AttributeValueHash,
Source§fn set_indirect_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>where
T: AttributeValueHash,
fn set_indirect_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>where
T: AttributeValueHash,
Source§fn insert_indirect_attrib_data<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: IndirectData,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>
fn insert_indirect_attrib_data<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, data: IndirectData, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>
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>
fn set_indirect_attrib_data<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, data: IndirectData, ) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>
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>
fn duplicate_attrib<'a, 'b, T, I: AttribIndex<Self>>( &mut self, name: &'a str, new_name: &'b str, ) -> Result<&mut Attribute<I>, Error>
Source§fn remove_attrib<I: AttribIndex<Self>>(
&mut self,
name: &str,
) -> Result<Attribute<I>, Error>
fn remove_attrib<I: AttribIndex<Self>>( &mut self, name: &str, ) -> Result<Attribute<I>, Error>
Source§fn insert_attrib<I: AttribIndex<Self>>(
&mut self,
name: &str,
attrib: Attribute<I>,
) -> Result<Option<Attribute<I>>, Error>
fn insert_attrib<I: AttribIndex<Self>>( &mut self, name: &str, attrib: Attribute<I>, ) -> Result<Option<Attribute<I>>, Error>
HashMap
semantics. Read moreSource§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,
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,
Source§fn attrib_or_insert_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: &[T],
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
fn attrib_or_insert_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: &[T],
) -> Result<&mut Attribute<I>, Error>where
T: AttributeValue + Default,
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>where
T: AttributeValueHash,
fn attrib_or_insert_indirect<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T,
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>where
T: AttributeValueHash,
Source§fn direct_attrib_iter<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str,
) -> Result<Iter<'b, T>, Error>
fn direct_attrib_iter<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<Iter<'b, T>, Error>
Source§fn attrib_iter_mut<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b mut self,
name: &'a str,
) -> Result<IterMut<'b, T>, Error>
fn attrib_iter_mut<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b mut self, name: &'a str, ) -> Result<IterMut<'b, T>, Error>
Source§fn attrib_iter<'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &str,
) -> Result<Box<dyn Iterator<Item = &'b T> + 'b>, Error>
fn attrib_iter<'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &str, ) -> Result<Box<dyn Iterator<Item = &'b T> + 'b>, Error>
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>
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>
Source§fn attrib_exists<I: AttribIndex<Self>>(&self, name: &str) -> bool
fn attrib_exists<I: AttribIndex<Self>>(&self, name: &str) -> bool
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>
fn attrib_check<'a, T: Any, I: AttribIndex<Self>>( &self, name: &'a str, ) -> Result<&Attribute<I>, Error>
Source§fn attrib_as_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str,
) -> Result<&'b [T], Error>
fn attrib_as_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str, ) -> Result<&'b [T], Error>
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>
fn attrib_as_mut_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>( &'b mut self, name: &'a str, ) -> Result<&'b mut [T], Error>
Source§fn attrib_clone_into_vec<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str,
) -> Result<Vec<T>, Error>where
T: AttributeValueHash,
fn attrib_clone_into_vec<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str,
) -> Result<Vec<T>, Error>where
T: AttributeValueHash,
Vec<T>
. Read moreSource§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,
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,
Vec<T>
. Read moreSource§fn attrib<'a, I: AttribIndex<Self>>(
&self,
name: &'a str,
) -> Result<&Attribute<I>, Error>
fn attrib<'a, I: AttribIndex<Self>>( &self, name: &'a str, ) -> Result<&Attribute<I>, Error>
Source§fn attrib_mut<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
) -> Result<&mut Attribute<I>, Error>
fn attrib_mut<'a, I: AttribIndex<Self>>( &mut self, name: &'a str, ) -> Result<&mut Attribute<I>, Error>
Source§impl<T: Real> CellAttrib for TetMeshExt<T>
impl<T: Real> CellAttrib for TetMeshExt<T>
Source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
Source§fn topo_attrib_dict(&self) -> &AttribDict<CellIndex>
fn topo_attrib_dict(&self) -> &AttribDict<CellIndex>
Source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellIndex>
Source§fn topo_attrib_dict_and_cache_mut(
&mut self,
) -> (&mut AttribDict<CellIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellIndex>, Option<&mut AttribValueCache>)
Source§impl<T: Real> CellFace for TetMeshExt<T>
impl<T: Real> CellFace for TetMeshExt<T>
Source§fn face<CFI>(&self, cf_idx: CFI) -> FaceIndex
fn face<CFI>(&self, cf_idx: CFI) -> FaceIndex
Source§fn cell_face<CI>(&self, cidx: CI, which: usize) -> Option<CellFaceIndex>
fn cell_face<CI>(&self, cidx: CI, which: usize) -> Option<CellFaceIndex>
Source§fn num_cell_faces(&self) -> usize
fn num_cell_faces(&self) -> usize
Source§fn num_faces_at_cell<CI>(&self, cidx: CI) -> usize
fn num_faces_at_cell<CI>(&self, cidx: CI) -> usize
Source§impl<T: Real> CellFaceAttrib for TetMeshExt<T>
impl<T: Real> CellFaceAttrib for TetMeshExt<T>
Source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
Source§fn topo_attrib_dict(&self) -> &AttribDict<CellFaceIndex>
fn topo_attrib_dict(&self) -> &AttribDict<CellFaceIndex>
Source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellFaceIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellFaceIndex>
Source§fn topo_attrib_dict_and_cache_mut(
&mut self,
) -> (&mut AttribDict<CellFaceIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellFaceIndex>, Option<&mut AttribValueCache>)
Source§impl<T: Real> CellVertex for TetMeshExt<T>
impl<T: Real> CellVertex for TetMeshExt<T>
Source§fn vertex<CVI>(&self, cv_idx: CVI) -> VertexIndex
fn vertex<CVI>(&self, cv_idx: CVI) -> VertexIndex
Source§fn cell_vertex<CI>(&self, cidx: CI, which: usize) -> Option<CellVertexIndex>
fn cell_vertex<CI>(&self, cidx: CI, which: usize) -> Option<CellVertexIndex>
Source§fn num_cell_vertices(&self) -> usize
fn num_cell_vertices(&self) -> usize
Source§fn num_vertices_at_cell<CI>(&self, cidx: CI) -> usize
fn num_vertices_at_cell<CI>(&self, cidx: CI) -> usize
Source§fn cell_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex>
fn cell_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex>
Source§fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumCells + NumVertices,
fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumCells + NumVertices,
Source§fn reverse_source_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumVertices,
fn reverse_source_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumVertices,
Source§impl<T: Real> CellVertexAttrib for TetMeshExt<T>
impl<T: Real> CellVertexAttrib for TetMeshExt<T>
Source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
Source§fn topo_attrib_dict(&self) -> &AttribDict<CellVertexIndex>
fn topo_attrib_dict(&self) -> &AttribDict<CellVertexIndex>
Source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellVertexIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<CellVertexIndex>
Source§fn topo_attrib_dict_and_cache_mut(
&mut self,
) -> (&mut AttribDict<CellVertexIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<CellVertexIndex>, Option<&mut AttribValueCache>)
Source§impl<T: Clone + Real> Clone for TetMeshExt<T>
impl<T: Clone + Real> Clone for TetMeshExt<T>
Source§fn clone(&self) -> TetMeshExt<T>
fn clone(&self) -> TetMeshExt<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T: Real> Default for TetMeshExt<T>
impl<T: Real> Default for TetMeshExt<T>
Source§impl<T: Real> From<TetMesh<T>> for TetMeshExt<T>
impl<T: Real> From<TetMesh<T>> for TetMeshExt<T>
Source§fn from(tetmesh: TetMesh<T>) -> TetMeshExt<T>
fn from(tetmesh: TetMesh<T>) -> TetMeshExt<T>
Source§impl<T: Real> From<TetMeshExt<T>> for TetMesh<T>
impl<T: Real> From<TetMeshExt<T>> for TetMesh<T>
Source§fn from(ext: TetMeshExt<T>) -> TetMesh<T>
fn from(ext: TetMeshExt<T>) -> TetMesh<T>
Source§impl<T: Real> Merge for TetMeshExt<T>
impl<T: Real> Merge for TetMeshExt<T>
Source§fn merge(&mut self, other: Self) -> &mut Self
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>) -> Selfwhere
Self: Default,
fn merge_iter(iterable: impl IntoIterator<Item = Self>) -> Selfwhere
Self: Default,
Source§fn merge_vec(vec: Vec<Self>) -> Selfwhere
Self: Default,
fn merge_vec(vec: Vec<Self>) -> Selfwhere
Self: Default,
Vec
of objects into one of the same type.Source§fn merge_slice(slice: &[Self]) -> Self
fn merge_slice(slice: &[Self]) -> Self
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> NumVertices for TetMeshExt<T>
Define TetMeshExt
topology
impl<T: Real> NumVertices for TetMeshExt<T>
Define TetMeshExt
topology
fn num_vertices(&self) -> usize
Source§impl<T: Real> Split<VertexIndex> for TetMeshExt<T>
impl<T: Real> Split<VertexIndex> for TetMeshExt<T>
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>,
fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
Source§fn split_by_attrib_ord<T: PartialOrd + AttributeValue>(
self,
attrib: &str,
) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
fn split_by_attrib_ord<T: PartialOrd + AttributeValue>(
self,
attrib: &str,
) -> Vec<Self>where
Self: Attrib,
Src: AttribIndex<Self>,
PartialOrd
. Read moreSource§impl<T: Real> SplitIntoConnectedComponents<VertexIndex, CellIndex> for TetMeshExt<T>
impl<T: Real> SplitIntoConnectedComponents<VertexIndex, CellIndex> for TetMeshExt<T>
fn split_into_connected_components(self) -> Vec<Self>
Source§impl<T: Real> VertexAttrib for TetMeshExt<T>
impl<T: Real> VertexAttrib for TetMeshExt<T>
Source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
Source§fn topo_attrib_dict(&self) -> &AttribDict<VertexIndex>
fn topo_attrib_dict(&self) -> &AttribDict<VertexIndex>
Source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexIndex>
Source§fn topo_attrib_dict_and_cache_mut(
&mut self,
) -> (&mut AttribDict<VertexIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<VertexIndex>, Option<&mut AttribValueCache>)
Source§impl<T: Real> VertexCell for TetMeshExt<T>
impl<T: Real> VertexCell for TetMeshExt<T>
Source§fn cell<VCI>(&self, vc_idx: VCI) -> CellIndex
fn cell<VCI>(&self, vc_idx: VCI) -> CellIndex
Source§fn vertex_cell<VI>(&self, vidx: VI, which: usize) -> Option<VertexCellIndex>
fn vertex_cell<VI>(&self, vidx: VI, which: usize) -> Option<VertexCellIndex>
Source§fn num_vertex_cells(&self) -> usize
fn num_vertex_cells(&self) -> usize
Source§fn num_cells_at_vertex<VI>(&self, vidx: VI) -> usize
fn num_cells_at_vertex<VI>(&self, vidx: VI) -> usize
Source§impl<T: Real> VertexCellAttrib for TetMeshExt<T>
impl<T: Real> VertexCellAttrib for TetMeshExt<T>
Source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
Source§fn topo_attrib_dict(&self) -> &AttribDict<VertexCellIndex>
fn topo_attrib_dict(&self) -> &AttribDict<VertexCellIndex>
Source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexCellIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexCellIndex>
Source§fn topo_attrib_dict_and_cache_mut(
&mut self,
) -> (&mut AttribDict<VertexCellIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self, ) -> (&mut AttribDict<VertexCellIndex>, Option<&mut AttribValueCache>)
Source§impl<T: Real> VertexPositions for TetMeshExt<T>
impl<T: Real> VertexPositions for TetMeshExt<T>
type Element = <TetMesh<T> as VertexPositions>::Element
Source§fn vertex_positions(&self) -> &[Self::Element]
fn vertex_positions(&self) -> &[Self::Element]
Source§fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
Source§fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
Source§fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
Source§fn vertex_position<VI>(&self, vidx: VI) -> Self::Element
fn vertex_position<VI>(&self, vidx: VI) -> Self::Element
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<M, T> BoundingBox<T> for M
impl<M, T> BoundingBox<T> for M
Source§fn bounding_box(&self) -> BBox<T>
fn bounding_box(&self) -> BBox<T>
Compute the bounding box of this object.
Source§impl<T> CloneBytes for Twhere
T: Clone + 'static,
impl<T> CloneBytes for Twhere
T: Clone + 'static,
unsafe fn clone_bytes(src: &[MaybeUninit<u8>]) -> Box<[MaybeUninit<u8>]>
unsafe fn clone_from_bytes(dst: &mut [MaybeUninit<u8>], src: &[MaybeUninit<u8>])
unsafe fn clone_into_raw_bytes( src: &[MaybeUninit<u8>], dst: &mut [MaybeUninit<u8>], )
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<M> Connectivity<VertexIndex, CellIndex> for M
impl<M> Connectivity<VertexIndex, CellIndex> for M
Source§fn num_elements(&self) -> usize
fn num_elements(&self) -> usize
Source§fn push_neighbours<T>(
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
_: &(),
_: Option<&[T]>,
)
fn push_neighbours<T>( &self, index: VertexIndex, stack: &mut Vec<VertexIndex>, _: &(), _: Option<&[T]>, )
Source§fn precompute_topo(&self) -> Self::Topo
fn precompute_topo(&self) -> Self::Topo
Source§fn connectivity(&self) -> (Vec<usize>, usize)
fn connectivity(&self) -> (Vec<usize>, usize)
Source§impl<T> DebugBytes for Twhere
T: Debug + 'static,
impl<T> DebugBytes for Twhere
T: Debug + 'static,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropBytes for Twhere
T: 'static,
impl<T> DropBytes for Twhere
T: 'static,
unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])
Source§impl<'a, S, I> Get<'a, I> for Swhere
I: GetIndex<'a, S>,
impl<'a, S, I> Get<'a, I> for Swhere
I: GetIndex<'a, S>,
type Output = <I as GetIndex<'a, S>>::Output
fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>
Source§fn at(&self, idx: I) -> Self::Output
fn at(&self, idx: I) -> Self::Output
get
that will panic if the equivalent get
call is None
,
which typically means that the given index is out of bounds. Read moreSource§unsafe fn at_unchecked(&self, idx: I) -> Self::Output
unsafe fn at_unchecked(&self, idx: I) -> Self::Output
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<S, I> Isolate<I> for Swhere
I: IsolateIndex<S>,
impl<S, I> Isolate<I> for Swhere
I: IsolateIndex<S>,
Source§impl<T> PartialEqBytes for Twhere
T: PartialEq + 'static,
impl<T> PartialEqBytes for Twhere
T: PartialEq + 'static,
unsafe fn eq_bytes(a: &[MaybeUninit<u8>], b: &[MaybeUninit<u8>]) -> bool
Source§impl<M> Partition for Mwhere
M: Attrib,
impl<M> Partition for Mwhere
M: Attrib,
Source§fn partition_by_attrib<T, Src>(&self, attrib: &str) -> (Vec<usize>, usize)where
T: AttributeValueHash,
Src: AttribIndex<M>,
fn partition_by_attrib<T, Src>(&self, attrib: &str) -> (Vec<usize>, usize)where
T: AttributeValueHash,
Src: AttribIndex<M>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, N> PushArrayToVec<N> for T
impl<T, N> PushArrayToVec<N> for T
Source§impl<T, M> Rotate<T> for M
impl<T, M> Rotate<T> for M
Source§fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])
fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])
Rotate the mesh using the given column-major rotation matrix.
Source§fn rotate_by_vector(&mut self, e: [T; 3])where
T: Zero,
fn rotate_by_vector(&mut self, e: [T; 3])where
T: Zero,
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
impl<S, T> Rotated<T> for S
Source§fn rotated(self, u: [T; 3], theta: T) -> S
fn rotated(self, u: [T; 3], theta: T) -> S
self
rotated about the unit vector u
by the given angle theta
(in
radians). Read moreSource§fn rotated_by_matrix(self, mtx: [[T; 3]; 3]) -> S
fn rotated_by_matrix(self, mtx: [[T; 3]; 3]) -> S
self
rotated using the given column-major rotation matrixSource§fn rotated_by_vector(self, e: [T; 3]) -> S
fn rotated_by_vector(self, e: [T; 3]) -> S
self
rotated about the Euler vector e
.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.Source§impl<S, T> Translated<T> for Swhere
S: Translate<T>,
impl<S, T> Translated<T> for Swhere
S: Translate<T>,
Source§fn translated(self, t: [T; 3]) -> S
fn translated(self, t: [T; 3]) -> S
self
translated by the given translation vector t
.