pub struct QuadMesh<T: Real> {
    pub vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>,
    pub indices: IntrinsicAttribute<[usize; 4], FaceIndex>,
    pub vertex_attributes: AttribDict<VertexIndex>,
    pub face_attributes: AttribDict<FaceIndex>,
    pub face_vertex_attributes: AttribDict<FaceVertexIndex>,
    pub face_edge_attributes: AttribDict<FaceEdgeIndex>,
    pub attribute_value_cache: AttribValueCache,
}

Fields§

§vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>

Vertex positions.

§indices: IntrinsicAttribute<[usize; 4], FaceIndex>

Quadruples of indices into vertices representing quadrilaterals.

§vertex_attributes: AttribDict<VertexIndex>

Vertex attributes.

§face_attributes: AttribDict<FaceIndex>

Quad attributes.

§face_vertex_attributes: AttribDict<FaceVertexIndex>

Quad vertex attributes.

§face_edge_attributes: AttribDict<FaceEdgeIndex>

Quad edge attributes.

§attribute_value_cache: AttribValueCache

Indirect attribute value cache

Implementations§

source§

impl<T: Real> QuadMesh<T>

source

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

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> QuadMesh<T>

source

pub fn split_by_face_partition( self, face_partition: &[usize], num_parts: usize ) -> (Vec<Self>, Vec<Vec<usize>>)

Split the mesh by the given face partition.

Returns a vector of meshes and the mapping from new vertex indices to old vertex indices, since some may have been duplicated. The faces remain in the same order as in the original mesh.

source

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

Split the mesh by the given partition.

Returns a vector of meshes and the mapping from old face index to new face index.

source§

impl<T: Real> QuadMesh<T>

source

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

source

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

Iterate over each face.

source

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

Iterate mutably over each face.

source

pub fn face<FI: Into<FaceIndex>>(&self, fidx: FI) -> &[usize; 4]

Face accessor. These are vertex indices.

Panics

This function panics when the given face index is out of bounds.

source

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

Return a slice of individual faces.

source

pub fn reverse(&mut self)

Reverse the order of each polygon in this mesh.

source

pub fn reversed(self) -> Self

Reverse the order of each polygon in this mesh. This is the consuming version of the reverse method.

source

pub fn sort_vertices_by_key<K, F>(&mut self, f: F) -> Vec<usize>
where F: FnMut(usize) -> K, K: Ord,

Sort vertices by the given key values, and return the reulting order (permutation).

This function assumes we have at least one vertex.

source

pub fn fuse_vertices_by_attrib<K, F>( &mut self, attrib_name: &str, join: F ) -> Result<(), Error>
where K: Hash + Eq + Clone + 'static, F: Fn(&[[T; 3]]) -> [T; 3],

Fuses vertices with matching attribute value together.

If two or more vertices have the same value for the given attribute, they are fused into one. The given function joins the positions of vertices whose attribute value matches.

Trait Implementations§

source§

impl<T: Real> Attrib for QuadMesh<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<'_, 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<'_, 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: Clone + Real> Clone for QuadMesh<T>

source§

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

Returns a copy 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 QuadMesh<T>

source§

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

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

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

source§

fn default() -> Self

Produce an empty mesh. 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> FaceAttrib for QuadMesh<T>

source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
source§

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

Mesh implementation of the attribute dictionary getter.
source§

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

Mesh implementation of the attribute dictionary mutable getter.
source§

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

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

impl<T: Real> FaceEdge for QuadMesh<T>

source§

fn edge<FEI>(&self, fe_idx: FEI) -> EdgeIndex
where FEI: Copy + Into<FaceEdgeIndex>,

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

fn face_edge<FI>(&self, fidx: FI, which: usize) -> Option<FaceEdgeIndex>
where FI: Copy + Into<FaceIndex>,

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

fn num_face_edges(&self) -> usize

Topology quantifier. Number of connectors in total.
source§

fn num_edges_at_face<FI>(&self, _: FI) -> usize
where FI: Copy + Into<FaceIndex>,

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

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

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

impl<T: Real> FaceEdgeAttrib for QuadMesh<T>

source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
source§

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

Mesh implementation of the attribute dictionary getter.
source§

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

Mesh implementation of the attribute dictionary mutable getter.
source§

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

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

impl<T: Real> FaceVertex for QuadMesh<T>

source§

fn vertex<FVI>(&self, fv_idx: FVI) -> VertexIndex
where FVI: Copy + Into<FaceVertexIndex>,

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

fn face_vertex<FI>(&self, fidx: FI, which: usize) -> Option<FaceVertexIndex>
where FI: Copy + Into<FaceIndex>,

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

fn num_face_vertices(&self) -> usize

Topology quantifier. Number of connectors in total.
source§

fn num_vertices_at_face<FI>(&self, _: FI) -> usize
where FI: Copy + Into<FaceIndex>,

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

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

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

fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)
where Self: NumFaces + 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> FaceVertexAttrib for QuadMesh<T>

source§

fn topo_attrib_size(&self) -> usize

Mesh implementation of the attribute size getter.
source§

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

Mesh implementation of the attribute dictionary getter.
source§

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

Mesh implementation of the attribute dictionary mutable getter.
source§

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

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

impl<T: Real> From<QuadMesh<T>> for PointCloud<T>

Convert a quad mesh to a point cloud by erasing all quad data.

source§

fn from(mesh: QuadMesh<T>) -> PointCloud<T>

Converts to this type from the input type.
source§

impl<T: Real> From<QuadMesh<T>> for PolyMesh<T>

Convert a quad mesh into a polygon mesh.

source§

fn from(mesh: QuadMesh<T>) -> PolyMesh<T>

Converts to this type from the input type.
source§

impl<T: Real> From<QuadMesh<T>> for QuadMeshExt<T>

source§

fn from(base_mesh: QuadMesh<T>) -> QuadMeshExt<T>

Converts to this type from the input type.
source§

impl<T: Real> From<QuadMeshExt<T>> for QuadMesh<T>

source§

fn from(ext: QuadMeshExt<T>) -> QuadMesh<T>

Converts to this type from the input type.
source§

impl<T: Real> Merge for QuadMesh<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> NumFaces for QuadMesh<T>

source§

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

source§

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

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Real> Split<FaceIndex> for QuadMesh<T>

source§

fn split(self, 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> Split<VertexIndex> for QuadMesh<T>

source§

fn split(self, 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, FaceIndex> for QuadMesh<T>

source§

impl<T: Real> VertexAttrib for QuadMesh<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> VertexPositions for QuadMesh<T>

§

type Element = [T; 3]

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§

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

Auto Trait Implementations§

§

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

§

impl<T> Send for QuadMesh<T>

§

impl<T> Sync for QuadMesh<T>

§

impl<T> Unpin for QuadMesh<T>
where T: Unpin,

§

impl<T> UnwindSafe for QuadMesh<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<M> Connectivity<FaceVertexIndex, VertexIndex> for M

§

type Topo = (Vec<usize>, Vec<usize>)

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

fn precompute_topo( &self ) -> <M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo

Precompute additional topology information prior to determining 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: FaceVertexIndex, stack: &mut Vec<FaceVertexIndex>, topo: &<M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo, attrib: Option<&[T]> )
where T: Default + PartialEq,

Push all neighbours of the element at the given index to the given stack. 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<M> Connectivity<VertexIndex, FaceIndex> for M

§

type Topo = (Vec<usize>, Vec<usize>)

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

fn precompute_topo(&self) -> <M as Connectivity<VertexIndex, FaceIndex>>::Topo

Precompute additional topology information prior to determining 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>, topo: &<M as Connectivity<VertexIndex, FaceIndex>>::Topo, _: Option<&[T]> )
where T: Default + PartialEq,

Push all neighbours of the element at the given index to the given stack. 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>

§

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

§

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

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

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

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

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

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

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

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

§

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further 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>,

§

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<S, I> Isolate<I> for S
where I: IsolateIndex<S>,

§

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

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

§

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.
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

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,

§

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>,

§

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>,

§

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