Struct gut::mesh::uniform_poly_mesh::TriMesh [−][src]
Fields
vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>
Vertex positions.
indices: IntrinsicAttribute<[usize; 3], FaceIndex>
Triples of indices into vertices
representing triangles.
vertex_attributes: AttribDict<VertexIndex>
Vertex attributes.
face_attributes: AttribDict<FaceIndex>
Triangle attributes.
face_vertex_attributes: AttribDict<FaceVertexIndex>
Triangle vertex attributes.
face_edge_attributes: AttribDict<FaceEdgeIndex>
Triangle edge attributes.
attribute_value_cache: AttribValueCache
Indirect attribute value cache
Implementations
impl<T: Real> TriMesh<T>
[src]
impl<T: Real> TriMesh<T>
[src]
pub fn merge_with_vertex_source<'a, I>(
meshes: I,
source_attrib: &str
) -> Result<Self, Error> where
I: IntoIterator<Item = &'a Self>,
[src]
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.
impl<T: Real> TriMesh<T>
[src]
pub fn split_vertices_by_face_vertex_attrib(&mut self, attrib_name: &str)
[src]
Split vertices by a given face-vertex attribute.
If a pair of face-vertices have different values for the same vertex, then they will be split into distinct vertices. New vertex positions are appended at the end of the vertex position array.
If the given attribute doesn't exist, then nothing is changed.
impl<T: Real> TriMesh<T>
[src]
pub fn new(verts: Vec<[T; 3]>, indices: Vec<[usize; 3]>) -> TriMesh<T>
[src]
pub fn face_iter(&self) -> Iter<'_, [usize; 3]>
[src]
Iterate over each face.
pub fn face_iter_mut(&mut self) -> IterMut<'_, [usize; 3]>
[src]
Iterate mutably over each face.
pub fn face<FI: Into<FaceIndex>>(&self, fidx: FI) -> &[usize; 3]
[src]
Face accessor. These are vertex indices.
pub fn faces(&self) -> &[[usize; 3]]
[src]
Return a slice of individual faces.
pub fn reverse(&mut self)
[src]
Reverse the order of each polygon in this mesh.
pub fn reversed(mut self: Self) -> Self
[src]
Reverse the order of each polygon in this mesh. This is the consuming version of the
reverse
method.
pub fn sort_vertices_by_key<K, F>(&mut self, f: F) where
F: FnMut(usize) -> K,
K: Ord,
[src]
F: FnMut(usize) -> K,
K: Ord,
Sort vertices by the given key values.
impl<T: Real> TriMesh<T>
[src]
pub fn tri_iter<'a>(&'a self) -> impl Iterator<Item = Triangle<T>> + 'a
[src]
Triangle iterator.
use gut::mesh::TriMesh; use gut::prim::Triangle; let verts = vec![[0.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]]; let mesh = TriMesh::new(verts.clone(), vec![[0, 1, 2]]); let tri = Triangle::from_indexed_slice(&[0, 1, 2], verts.as_slice()); assert_eq!(Some(tri), mesh.tri_iter().next());
pub fn tri_from_indices(&self, indices: &[usize; 3]) -> Triangle<T>
[src]
Get a tetrahedron primitive corresponding to the given vertex indices.
Trait Implementations
impl<T: Real> Attrib for TriMesh<T>
[src]
fn attrib_size<I: AttribIndex<Self>>(&self) -> usize
[src]
fn attrib_dict<I: AttribIndex<Self>>(&self) -> &AttribDict<I>
[src]
fn attrib_dict_mut<I: AttribIndex<Self>>(&mut self) -> &mut AttribDict<I>
[src]
fn attrib_dict_and_cache_mut<I: AttribIndex<Self>>(
&mut self
) -> (&mut AttribDict<I>, Option<&mut AttribValueCache>)
[src]
&mut self
) -> (&mut AttribDict<I>, Option<&mut AttribValueCache>)
fn add_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
[src]
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
fn add_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: Vec<T>
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
[src]
&mut self,
name: &'a str,
data: Vec<T>
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
fn set_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
[src]
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
fn set_attrib_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: &[T]
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
[src]
&mut self,
name: &'a str,
data: &[T]
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
fn add_indirect_attrib<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error> where
T: AttributeValueHash,
[src]
&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,
[src]
&mut self,
name: &'a str,
def: T
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error> where
T: AttributeValueHash,
fn add_indirect_attrib_data<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: IndirectData
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>
[src]
&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>
[src]
&mut self,
name: &'a str,
data: IndirectData
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error>
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,
[src]
&mut self,
name: &'a str,
new_name: &'b str
) -> Result<&mut Attribute<I>, Error> where
T: Any + Clone,
fn remove_attrib<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str
) -> Result<Attribute<I>, Error>
[src]
&mut self,
name: &'a str
) -> Result<Attribute<I>, Error>
fn insert_attrib<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
attrib: Attribute<I>
) -> Result<Option<Attribute<I>>, Error>
[src]
&mut self,
name: &'a str,
attrib: Attribute<I>
) -> Result<Option<Attribute<I>>, Error>
fn attrib_or_add<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
[src]
&mut self,
name: &'a str,
def: T
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue,
fn attrib_or_add_data<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
data: &[T]
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
[src]
&mut self,
name: &'a str,
data: &[T]
) -> Result<&mut Attribute<I>, Error> where
T: AttributeValue + Default,
fn attrib_or_add_indirect<'a, T, I: AttribIndex<Self>>(
&mut self,
name: &'a str,
def: T
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error> where
T: AttributeValueHash,
[src]
&mut self,
name: &'a str,
def: T
) -> Result<(&mut Attribute<I>, &mut AttribValueCache), Error> where
T: AttributeValueHash,
fn direct_attrib_iter<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str
) -> Result<Iter<'_, T>, Error> where
T: Any + Clone,
[src]
&'b self,
name: &'a str
) -> Result<Iter<'_, T>, Error> where
T: Any + Clone,
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,
[src]
&'b mut self,
name: &'a str
) -> Result<IterMut<'_, T>, Error> where
T: Any + Clone,
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,
[src]
&'b self,
name: &str
) -> Result<Box<dyn Iterator<Item = &'b T> + 'b>, Error> where
T: Any + Clone,
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>>,
[src]
&'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>>,
fn attrib_exists<'a, I: AttribIndex<Self>>(&self, name: &'a str) -> bool
[src]
fn attrib_check<'a, T: Any, I: AttribIndex<Self>>(
&self,
name: &'a str
) -> Result<&Attribute<I>, Error>
[src]
&self,
name: &'a str
) -> Result<&Attribute<I>, Error>
fn attrib_as_slice<'a, 'b, T: 'static, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str
) -> Result<&'b [T], Error>
[src]
&'b self,
name: &'a str
) -> Result<&'b [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>
[src]
&'b mut self,
name: &'a str
) -> Result<&'b mut [T], Error>
fn attrib_clone_into_vec<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b self,
name: &'a str
) -> Result<Vec<T>, Error> where
T: AttributeValueHash,
[src]
&'b self,
name: &'a str
) -> Result<Vec<T>, Error> where
T: AttributeValueHash,
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,
[src]
&'b self,
name: &'a str
) -> Result<Vec<T>, Error> where
T: AttributeValue,
fn attrib<'a, I: AttribIndex<Self>>(
&self,
name: &'a str
) -> Result<&Attribute<I>, Error>
[src]
&self,
name: &'a str
) -> Result<&Attribute<I>, Error>
fn attrib_mut<'a, I: AttribIndex<Self>>(
&mut self,
name: &'a str
) -> Result<&mut Attribute<I>, Error>
[src]
&mut self,
name: &'a str
) -> Result<&mut Attribute<I>, Error>
impl<T: Real> AttribPromote<FaceVertexIndex, VertexIndex> for TriMesh<T>
[src]
fn attrib_promote<'a, U, F>(
&mut self,
name: &'a str,
mut combine: F
) -> Result<&Attribute<VertexIndex>, Error> where
U: Any + Clone,
F: for<'b> FnMut(&'b mut U, &'b U),
[src]
&mut self,
name: &'a str,
mut combine: F
) -> Result<&Attribute<VertexIndex>, Error> where
U: Any + Clone,
F: for<'b> FnMut(&'b mut U, &'b U),
impl<T: Clone + Real> Clone for TriMesh<T>
[src]
impl<T: Debug + Real> Debug for TriMesh<T>
[src]
impl<T: Real> Default for TriMesh<T>
[src]
fn default() -> Self
[src]
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.
impl<T: Real> FaceAttrib for TriMesh<T>
[src]
fn topo_attrib_size(&self) -> usize
[src]
fn topo_attrib_dict(&self) -> &AttribDict<FaceIndex>
[src]
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceIndex>
[src]
fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceIndex>, Option<&mut AttribValueCache>)
[src]
&mut self
) -> (&mut AttribDict<FaceIndex>, Option<&mut AttribValueCache>)
impl<T: Real> FaceEdge for TriMesh<T>
[src]
fn edge<FEI>(&self, fe_idx: FEI) -> EdgeIndex where
FEI: Copy + Into<FaceEdgeIndex>,
[src]
FEI: Copy + Into<FaceEdgeIndex>,
fn face_edge<FI>(&self, fidx: FI, which: usize) -> Option<FaceEdgeIndex> where
FI: Copy + Into<FaceIndex>,
[src]
FI: Copy + Into<FaceIndex>,
fn num_face_edges(&self) -> usize
[src]
fn num_edges_at_face<FI>(&self, _: FI) -> usize where
FI: Copy + Into<FaceIndex>,
[src]
FI: Copy + Into<FaceIndex>,
fn face_to_edge<I>(&self, i: I, k: usize) -> Option<EdgeIndex> where
I: Copy + Into<FaceIndex>,
[src]
I: Copy + Into<FaceIndex>,
impl<T: Real> FaceEdgeAttrib for TriMesh<T>
[src]
fn topo_attrib_size(&self) -> usize
[src]
fn topo_attrib_dict(&self) -> &AttribDict<FaceEdgeIndex>
[src]
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceEdgeIndex>
[src]
fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceEdgeIndex>, Option<&mut AttribValueCache>)
[src]
&mut self
) -> (&mut AttribDict<FaceEdgeIndex>, Option<&mut AttribValueCache>)
impl<T: Real> FaceVertex for TriMesh<T>
[src]
fn vertex<FVI>(&self, fv_idx: FVI) -> VertexIndex where
FVI: Copy + Into<FaceVertexIndex>,
[src]
FVI: Copy + Into<FaceVertexIndex>,
fn face_vertex<FI>(&self, fidx: FI, which: usize) -> Option<FaceVertexIndex> where
FI: Copy + Into<FaceIndex>,
[src]
FI: Copy + Into<FaceIndex>,
fn num_face_vertices(&self) -> usize
[src]
fn num_vertices_at_face<FI>(&self, _: FI) -> usize where
FI: Copy + Into<FaceIndex>,
[src]
FI: Copy + Into<FaceIndex>,
fn face_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex> where
I: Copy + Into<FaceIndex>,
[src]
I: Copy + Into<FaceIndex>,
fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>) where
Self: NumFaces + NumVertices,
[src]
Self: NumFaces + NumVertices,
fn reverse_source_topo(&self) -> (Vec<usize>, Vec<usize>) where
Self: NumVertices,
[src]
Self: NumVertices,
impl<T: Real> FaceVertexAttrib for TriMesh<T>
[src]
fn topo_attrib_size(&self) -> usize
[src]
fn topo_attrib_dict(&self) -> &AttribDict<FaceVertexIndex>
[src]
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceVertexIndex>
[src]
fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceVertexIndex>, Option<&mut AttribValueCache>)
[src]
&mut self
) -> (&mut AttribDict<FaceVertexIndex>, Option<&mut AttribValueCache>)
impl<T: Real> From<PolyMesh<T>> for TriMesh<T>
[src]
Convert a triangle mesh to a polygon mesh.
impl<T: Real> From<TetMesh<T>> for TriMesh<T>
[src]
impl<T: Real> From<TriMesh<T>> for PointCloud<T>
[src]
Convert a triangle mesh to a point cloud by erasing all triangle data.
fn from(mesh: TriMesh<T>) -> PointCloud<T>
[src]
impl<T: Real> From<TriMesh<T>> for PolyMesh<T>
[src]
Convert a triangle mesh into a polygon mesh.
impl<T: Real> From<TriMesh<T>> for TriMeshExt<T>
[src]
fn from(base_mesh: TriMesh<T>) -> TriMeshExt<T>
[src]
impl<T: Real> From<TriMeshExt<T>> for TriMesh<T>
[src]
fn from(ext: TriMeshExt<T>) -> TriMesh<T>
[src]
impl<T: Real> Merge for TriMesh<T>
[src]
fn merge(&mut self, other: Self) -> &mut Self
[src]
Attributes with the same name but different types won't be merged.
fn merge_iter(iterable: impl IntoIterator<Item = Self>) -> Self where
Self: Default,
[src]
Self: Default,
fn merge_vec(vec: Vec<Self>) -> Self where
Self: Default,
[src]
Self: Default,
fn merge_slice(slice: &[Self]) -> Self where
Self: Clone + Default,
[src]
Self: Clone + Default,
impl<T: Real> NumFaces for TriMesh<T>
[src]
impl<T: Real> NumVertices for TriMesh<T>
[src]
fn num_vertices(&self) -> usize
[src]
impl<T: PartialEq + Real> PartialEq<TriMesh<T>> for TriMesh<T>
[src]
impl<T: Real> Split<VertexIndex> for TriMesh<T>
[src]
impl<T: Real> SplitIntoConnectedComponents<VertexIndex, FaceIndex> for TriMesh<T>
[src]
fn split_into_connected_components(self) -> Vec<Self>
[src]
impl<T: Real> StructuralPartialEq for TriMesh<T>
[src]
impl<T: Real> VertexAttrib for TriMesh<T>
[src]
fn topo_attrib_size(&self) -> usize
[src]
fn topo_attrib_dict(&self) -> &AttribDict<VertexIndex>
[src]
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<VertexIndex>
[src]
fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<VertexIndex>, Option<&mut AttribValueCache>)
[src]
&mut self
) -> (&mut AttribDict<VertexIndex>, Option<&mut AttribValueCache>)
impl<T: Real> VertexPositions for TriMesh<T>
[src]
type Element = [T; 3]
fn vertex_positions(&self) -> &[Self::Element]
[src]
fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
[src]
fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
[src]
fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
[src]
fn vertex_position<VI>(&self, vidx: VI) -> Self::Element where
VI: Into<VertexIndex>,
[src]
VI: Into<VertexIndex>,
Auto Trait Implementations
impl<T> RefUnwindSafe for TriMesh<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for TriMesh<T>
[src]
impl<T> Sync for TriMesh<T>
[src]
impl<T> Unpin for TriMesh<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for TriMesh<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsSlice<T> for T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<M, T> BoundingBox<T> for M where
T: Real,
M: VertexPositions<Element = [T; 3]>,
[src]
T: Real,
M: VertexPositions<Element = [T; 3]>,
pub fn bounding_box(&Self) -> BBox<T>
[src]
Compute the bounding box of this object.
impl<T> CloneBytes for T where
T: 'static + Clone,
[src]
T: 'static + Clone,
pub unsafe fn clone_bytes(
src: &[MaybeUninit<u8>]
) -> Box<[MaybeUninit<u8>], Global>
[src]
src: &[MaybeUninit<u8>]
) -> Box<[MaybeUninit<u8>], Global>
pub unsafe fn clone_from_bytes(
dst: &mut [MaybeUninit<u8>],
src: &[MaybeUninit<u8>]
)
[src]
dst: &mut [MaybeUninit<u8>],
src: &[MaybeUninit<u8>]
)
pub unsafe fn clone_into_raw_bytes(
src: &[MaybeUninit<u8>],
dst: &mut [MaybeUninit<u8>]
)
[src]
src: &[MaybeUninit<u8>],
dst: &mut [MaybeUninit<u8>]
)
impl<M> Connectivity<FaceVertexIndex, VertexIndex> for M where
M: NumVertices + NumFaces + FaceVertex,
[src]
M: NumVertices + NumFaces + FaceVertex,
type Topo = (Vec<usize, Global>, Vec<usize, Global>)
Additional topology that may aid in computing connectivity. Read more
pub fn precompute_topo(
&Self
) -> <M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo
[src]
&Self
) -> <M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo
pub fn num_elements(&Self) -> usize
[src]
pub fn push_neighbours<T>(
&Self,
FaceVertexIndex,
&mut Vec<FaceVertexIndex, Global>,
&<M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo,
Option<&[T]>
) where
T: PartialEq<T> + Default,
[src]
&Self,
FaceVertexIndex,
&mut Vec<FaceVertexIndex, Global>,
&<M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo,
Option<&[T]>
) where
T: PartialEq<T> + Default,
fn connectivity(&self) -> (Vec<usize>, usize)
[src]
fn connectivity_via_attrib<T>(
&self,
attrib: Option<&str>
) -> (Vec<usize>, usize) where
Self: Attrib,
Src: AttribIndex<Self>,
T: Default + PartialEq + 'static,
[src]
&self,
attrib: Option<&str>
) -> (Vec<usize>, usize) where
Self: Attrib,
Src: AttribIndex<Self>,
T: Default + PartialEq + 'static,
fn connectivity_via_attrib_fn<'a, T, F>(&self, f: F) -> (Vec<usize>, usize) where
T: Default + PartialEq + 'a,
F: FnOnce() -> Option<&'a [T]>,
[src]
T: Default + PartialEq + 'a,
F: FnOnce() -> Option<&'a [T]>,
impl<M> Connectivity<VertexIndex, FaceIndex> for M where
M: NumVertices + NumFaces + FaceVertex,
[src]
M: NumVertices + NumFaces + FaceVertex,
type Topo = (Vec<usize, Global>, Vec<usize, Global>)
Additional topology that may aid in computing connectivity. Read more
pub fn precompute_topo(
&Self
) -> <M as Connectivity<VertexIndex, FaceIndex>>::Topo
[src]
&Self
) -> <M as Connectivity<VertexIndex, FaceIndex>>::Topo
pub fn num_elements(&Self) -> usize
[src]
pub fn push_neighbours<T>(
&Self,
VertexIndex,
&mut Vec<VertexIndex, Global>,
&<M as Connectivity<VertexIndex, FaceIndex>>::Topo,
Option<&[T]>
) where
T: PartialEq<T> + Default,
[src]
&Self,
VertexIndex,
&mut Vec<VertexIndex, Global>,
&<M as Connectivity<VertexIndex, FaceIndex>>::Topo,
Option<&[T]>
) where
T: PartialEq<T> + Default,
fn connectivity(&self) -> (Vec<usize>, usize)
[src]
fn connectivity_via_attrib<T>(
&self,
attrib: Option<&str>
) -> (Vec<usize>, usize) where
Self: Attrib,
Src: AttribIndex<Self>,
T: Default + PartialEq + 'static,
[src]
&self,
attrib: Option<&str>
) -> (Vec<usize>, usize) where
Self: Attrib,
Src: AttribIndex<Self>,
T: Default + PartialEq + 'static,
fn connectivity_via_attrib_fn<'a, T, F>(&self, f: F) -> (Vec<usize>, usize) where
T: Default + PartialEq + 'a,
F: FnOnce() -> Option<&'a [T]>,
[src]
T: Default + PartialEq + 'a,
F: FnOnce() -> Option<&'a [T]>,
impl<T> DebugBytes for T where
T: 'static + Debug,
[src]
T: 'static + Debug,
pub unsafe fn fmt_bytes(
bytes: &[MaybeUninit<u8>],
f: &mut Formatter<'_>
) -> Result<(), Error>
[src]
bytes: &[MaybeUninit<u8>],
f: &mut Formatter<'_>
) -> Result<(), Error>
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> DropBytes for T where
T: 'static,
[src]
T: 'static,
pub unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])
[src]
impl<T> Elem for T where
T: Any + DropBytes,
[src]
T: Any + DropBytes,
impl<T> From<T> for T
[src]
impl<'a, S, I> Get<'a, I> for S where
I: GetIndex<'a, S>,
[src]
I: GetIndex<'a, S>,
type Output = <I as GetIndex<'a, S>>::Output
pub fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>
[src]
pub fn at(&self, idx: I) -> Self::Output
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S, I> Isolate<I> for S where
I: IsolateIndex<S>,
[src]
I: IsolateIndex<S>,
type Output = <I as IsolateIndex<S>>::Output
pub unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output
[src]
pub fn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>
[src]
pub fn isolate(self, idx: I) -> Self::Output
[src]
impl<T> PartialEqBytes for T where
T: 'static + PartialEq<T>,
[src]
T: 'static + PartialEq<T>,
impl<M> Partition for M where
M: Attrib,
[src]
M: Attrib,
pub fn partition_by_attrib<T, Src>(&Self, &str) -> (Vec<usize, Global>, usize) where
T: AttributeValueHash,
Src: AttribIndex<M>,
[src]
T: AttributeValueHash,
Src: AttribIndex<M>,
pub fn partition_by_attrib_by_sort<T, Src>(
&Self,
&str
) -> (Vec<usize, Global>, usize) where
T: AttributeValue + PartialOrd<T>,
Src: AttribIndex<M>,
[src]
&Self,
&str
) -> (Vec<usize, Global>, usize) where
T: AttributeValue + PartialOrd<T>,
Src: AttribIndex<M>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, N> PushArrayToVec<N> for T where
T: Clone,
N: Array<T>,
[src]
T: Clone,
N: Array<T>,
impl<T, M> Rotate<T> for M where
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
[src]
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
pub fn rotate_by_matrix(&mut Self, [[T; 3]; 3])
[src]
Rotate the mesh using the given column-major rotation matrix.
fn rotate(&mut self, axis: [T; 3], theta: T)
[src]
fn rotate_by_vector(&mut self, e: [T; 3]) where
T: Zero,
[src]
T: Zero,
impl<S, T> Rotated<T> for S where
T: BaseFloat,
S: Rotate<T>,
[src]
T: BaseFloat,
S: Rotate<T>,
pub fn rotated(Self, [T; 3], T) -> S
[src]
pub fn rotated_by_matrix(Self, [[T; 3]; 3]) -> S
[src]
pub fn rotated_by_vector(Self, [T; 3]) -> S
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, M> Scale<T> for M where
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
[src]
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
pub fn scale(&mut Self, [T; 3])
[src]
Scale a mesh in 3D by a given vector of scale factors.
s = [1.0; 3]
corresponds to a noop.
fn uniform_scale(&mut self, s: T)
[src]
impl<S, T> Scaled<T> for S where
T: Copy,
S: Scale<T>,
[src]
T: Copy,
S: Scale<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, M> Translate<T> for M where
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
[src]
T: BaseFloat,
M: VertexPositions<Element = [T; 3]>,
pub fn translate(&mut Self, [T; 3])
[src]
Translate the mesh by the given translation vector (displacement) t
.
impl<S, T> Translated<T> for S where
S: Translate<T>,
[src]
S: Translate<T>,
pub fn translated(Self, [T; 3]) -> S
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<M, T> VertexMesh<T> for M where
T: Real,
M: Attrib + VertexAttrib + NumVertices + VertexPositions<Element = [T; 3]>,
[src]
T: Real,
M: Attrib + VertexAttrib + NumVertices + VertexPositions<Element = [T; 3]>,