pub struct PolyMesh<T: Real> {
pub vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>,
pub indices: Vec<usize>,
pub offsets: Vec<usize>,
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,
}
Expand description
Mesh with arbitrarily shaped faces. It could have polygons with any number of sides. All faces are assumed to be closed polygons.
Fields§
§vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>
Vertex positions intrinsic attribute.
indices: Vec<usize>
Indices into vertices
representing face vertices.
offsets: Vec<usize>
Offsets into indices
representing individual faces. The last element in this Vec
is
always the length of indices
for convenience.
vertex_attributes: AttribDict<VertexIndex>
Vertex attributes.
face_attributes: AttribDict<FaceIndex>
Polygon attributes.
face_vertex_attributes: AttribDict<FaceVertexIndex>
Polygon vertex attributes.
face_edge_attributes: AttribDict<FaceEdgeIndex>
Polygon edge attributes.
attribute_value_cache: AttribValueCache
Indirect attribute value cache
Implementations§
source§impl<T: Real> PolyMesh<T>
impl<T: Real> PolyMesh<T>
sourcepub fn merge_with_vertex_source<'a, I>(
meshes: I,
source_attrib: &str
) -> Result<Self, Error>where
I: IntoIterator<Item = &'a Self>,
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> PolyMesh<T>
impl<T: Real> PolyMesh<T>
sourcepub fn split_vertices_by_face_vertex_attrib<U: PartialOrd + PartialEq + Copy + 'static>(
&mut self,
attrib: &str
)
pub fn split_vertices_by_face_vertex_attrib<U: PartialOrd + PartialEq + Copy + 'static>( &mut self, attrib: &str )
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.
source§impl<T: Real> PolyMesh<T>
impl<T: Real> PolyMesh<T>
sourcepub fn new(verts: Vec<[T; 3]>, faces: &[usize]) -> PolyMesh<T>
pub fn new(verts: Vec<[T; 3]>, faces: &[usize]) -> PolyMesh<T>
Construct a PolyMesh
from an array of vertices and an array of sizes and indices.
The faces
array contains the indices into the vertex array for each face preceeded by the
number of vertices in the corresponding face. I.e. faces
is expected to be structured as
a contiguous array of a number (corresponding to the number of vertices in the face)
followed by the vertex indices (in the same face):
n i_1 i_2 ... i_n m j_1 j_2 ... j_m ...
Examples
use meshx::mesh::PolyMesh;
let points = vec![
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[1.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
[1.0, 0.0, 1.0]];
let faces = vec![3, 0, 1, 2, // first triangle
3, 1, 3, 2, // second triangle
4, 0, 1, 5, 4]; // quadrilateral
let polymesh = PolyMesh::new(points, &faces);
assert_eq!(polymesh.indices, [0, 1, 2, 1, 3, 2, 0, 1, 5, 4]);
assert_eq!(polymesh.offsets, [0, 3, 6, 10]);
pub fn face_iter(&self) -> DynamicIndexSliceIter<'_> ⓘ
pub fn face_iter_mut(&mut self) -> DynamicIndexSliceIterMut<'_> ⓘ
Trait Implementations§
source§impl<T: Real> Attrib for PolyMesh<T>
impl<T: Real> Attrib for PolyMesh<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<'_, T>, Error>
fn direct_attrib_iter<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b self, name: &'a str ) -> Result<Iter<'_, T>, Error>
source§fn attrib_iter_mut<'a, 'b, T, I: 'b + AttribIndex<Self>>(
&'b mut self,
name: &'a str
) -> Result<IterMut<'_, T>, Error>
fn attrib_iter_mut<'a, 'b, T, I: 'b + AttribIndex<Self>>( &'b mut self, name: &'a str ) -> Result<IterMut<'_, 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> FaceAttrib for PolyMesh<T>
impl<T: Real> FaceAttrib for PolyMesh<T>
source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
source§fn topo_attrib_dict(&self) -> &AttribDict<FaceIndex>
fn topo_attrib_dict(&self) -> &AttribDict<FaceIndex>
source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceIndex>
source§fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self ) -> (&mut AttribDict<FaceIndex>, Option<&mut AttribValueCache>)
source§impl<T: Real> FaceEdge for PolyMesh<T>
impl<T: Real> FaceEdge for PolyMesh<T>
source§fn edge<FEI>(&self, fe_idx: FEI) -> EdgeIndex
fn edge<FEI>(&self, fe_idx: FEI) -> EdgeIndex
source§fn face_edge<FI>(&self, fidx: FI, which: usize) -> Option<FaceEdgeIndex>
fn face_edge<FI>(&self, fidx: FI, which: usize) -> Option<FaceEdgeIndex>
source§fn num_face_edges(&self) -> usize
fn num_face_edges(&self) -> usize
source§fn num_edges_at_face<FI>(&self, fidx: FI) -> usize
fn num_edges_at_face<FI>(&self, fidx: FI) -> usize
source§impl<T: Real> FaceEdgeAttrib for PolyMesh<T>
impl<T: Real> FaceEdgeAttrib for PolyMesh<T>
source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
source§fn topo_attrib_dict(&self) -> &AttribDict<FaceEdgeIndex>
fn topo_attrib_dict(&self) -> &AttribDict<FaceEdgeIndex>
source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceEdgeIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceEdgeIndex>
source§fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceEdgeIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self ) -> (&mut AttribDict<FaceEdgeIndex>, Option<&mut AttribValueCache>)
source§impl<T: Real> FaceVertex for PolyMesh<T>
impl<T: Real> FaceVertex for PolyMesh<T>
source§fn vertex<FVI>(&self, fv_idx: FVI) -> VertexIndex
fn vertex<FVI>(&self, fv_idx: FVI) -> VertexIndex
source§fn face_vertex<FI>(&self, fidx: FI, which: usize) -> Option<FaceVertexIndex>
fn face_vertex<FI>(&self, fidx: FI, which: usize) -> Option<FaceVertexIndex>
source§fn num_face_vertices(&self) -> usize
fn num_face_vertices(&self) -> usize
source§fn num_vertices_at_face<FI>(&self, fidx: FI) -> usize
fn num_vertices_at_face<FI>(&self, fidx: FI) -> usize
source§fn face_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex>
fn face_to_vertex<I>(&self, i: I, k: usize) -> Option<VertexIndex>
source§fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumFaces + NumVertices,
fn reverse_topo(&self) -> (Vec<usize>, Vec<usize>)where
Self: NumFaces + 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> FaceVertexAttrib for PolyMesh<T>
impl<T: Real> FaceVertexAttrib for PolyMesh<T>
source§fn topo_attrib_size(&self) -> usize
fn topo_attrib_size(&self) -> usize
source§fn topo_attrib_dict(&self) -> &AttribDict<FaceVertexIndex>
fn topo_attrib_dict(&self) -> &AttribDict<FaceVertexIndex>
source§fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceVertexIndex>
fn topo_attrib_dict_mut(&mut self) -> &mut AttribDict<FaceVertexIndex>
source§fn topo_attrib_dict_and_cache_mut(
&mut self
) -> (&mut AttribDict<FaceVertexIndex>, Option<&mut AttribValueCache>)
fn topo_attrib_dict_and_cache_mut( &mut self ) -> (&mut AttribDict<FaceVertexIndex>, Option<&mut AttribValueCache>)
source§impl<T: Real> From<PointCloud<T>> for PolyMesh<T>
impl<T: Real> From<PointCloud<T>> for PolyMesh<T>
Convert a point cloud into a polygon mesh.
source§fn from(mesh: PointCloud<T>) -> PolyMesh<T>
fn from(mesh: PointCloud<T>) -> PolyMesh<T>
source§impl<T: Real> From<PolyMesh<T>> for LineMesh<T>
impl<T: Real> From<PolyMesh<T>> for LineMesh<T>
source§fn from(mesh: PolyMesh<T>) -> LineMesh<T>
fn from(mesh: PolyMesh<T>) -> LineMesh<T>
Convert a PolyMesh into a LineMesh. This is effectively a wireframe construction.
Note that this conversion does not merge any attributes, each face will generate its own edge. This means that two neighbouring faces will generate two overlapping edges. This is done to preserve all attribute data during the conversion, which means that some of it is duplicated.
source§impl<T: Real> From<PolyMesh<T>> for PointCloud<T>
impl<T: Real> From<PolyMesh<T>> for PointCloud<T>
Convert a polygon mesh to a point cloud by erasing all polygon data.
source§fn from(polymesh: PolyMesh<T>) -> PointCloud<T>
fn from(polymesh: PolyMesh<T>) -> PointCloud<T>
source§impl<T: Real> From<PolyMesh<T>> for TriMeshExt<T>
impl<T: Real> From<PolyMesh<T>> for TriMeshExt<T>
Convert a triangle mesh to a polygon mesh.
source§fn from(mesh: PolyMesh<T>) -> TriMeshExt<T>
fn from(mesh: PolyMesh<T>) -> TriMeshExt<T>
source§impl<T: Real> Merge for PolyMesh<T>
impl<T: Real> Merge for PolyMesh<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§impl<T: Real> MeshBuilder<PolyMesh<T>> for BoxBuilder
impl<T: Real> MeshBuilder<PolyMesh<T>> for BoxBuilder
source§impl<T: Real> MeshBuilder<PolyMesh<T>> for GridBuilder
impl<T: Real> MeshBuilder<PolyMesh<T>> for GridBuilder
source§impl<T: Real> NumVertices for PolyMesh<T>
impl<T: Real> NumVertices for PolyMesh<T>
fn num_vertices(&self) -> usize
source§impl<T: PartialEq + Real> PartialEq for PolyMesh<T>
impl<T: PartialEq + Real> PartialEq for PolyMesh<T>
source§impl<T: Real> Split<VertexIndex> for PolyMesh<T>
impl<T: Real> Split<VertexIndex> for PolyMesh<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, FaceIndex> for PolyMesh<T>
impl<T: Real> SplitIntoConnectedComponents<VertexIndex, FaceIndex> for PolyMesh<T>
fn split_into_connected_components(self) -> Vec<Self>
source§impl<T: Real> VertexAttrib for PolyMesh<T>
impl<T: Real> VertexAttrib for PolyMesh<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> VertexPositions for PolyMesh<T>
impl<T: Real> VertexPositions for PolyMesh<T>
type Element = [T; 3]
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>
impl<T: Real> StructuralPartialEq for PolyMesh<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PolyMesh<T>where
T: RefUnwindSafe,
impl<T> Send for PolyMesh<T>
impl<T> Sync for PolyMesh<T>
impl<T> Unpin for PolyMesh<T>where
T: Unpin,
impl<T> UnwindSafe for PolyMesh<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<M> Connectivity<FaceVertexIndex, VertexIndex> for M
impl<M> Connectivity<FaceVertexIndex, VertexIndex> for M
§type Topo = (Vec<usize>, Vec<usize>)
type Topo = (Vec<usize>, Vec<usize>)
source§fn precompute_topo(
&self
) -> <M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo
fn precompute_topo( &self ) -> <M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo
source§fn num_elements(&self) -> usize
fn num_elements(&self) -> usize
source§fn push_neighbours<T>(
&self,
index: FaceVertexIndex,
stack: &mut Vec<FaceVertexIndex>,
topo: &<M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo,
attrib: Option<&[T]>
)
fn push_neighbours<T>( &self, index: FaceVertexIndex, stack: &mut Vec<FaceVertexIndex>, topo: &<M as Connectivity<FaceVertexIndex, VertexIndex>>::Topo, attrib: Option<&[T]> )
source§fn connectivity(&self) -> (Vec<usize>, usize)
fn connectivity(&self) -> (Vec<usize>, usize)
source§impl<M> Connectivity<VertexIndex, FaceIndex> for M
impl<M> Connectivity<VertexIndex, FaceIndex> for M
§type Topo = (Vec<usize>, Vec<usize>)
type Topo = (Vec<usize>, Vec<usize>)
source§fn precompute_topo(&self) -> <M as Connectivity<VertexIndex, FaceIndex>>::Topo
fn precompute_topo(&self) -> <M as Connectivity<VertexIndex, FaceIndex>>::Topo
source§fn num_elements(&self) -> usize
fn num_elements(&self) -> usize
source§fn push_neighbours<T>(
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
topo: &<M as Connectivity<VertexIndex, FaceIndex>>::Topo,
_: Option<&[T]>
)
fn push_neighbours<T>( &self, index: VertexIndex, stack: &mut Vec<VertexIndex>, topo: &<M as Connectivity<VertexIndex, FaceIndex>>::Topo, _: Option<&[T]> )
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>
. 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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
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.§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.§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<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>,
§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 Swhere
T: RealField,
S: Rotate<T>,
impl<S, T> Rotated<T> for Swhere
T: RealField,
S: Rotate<T>,
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<T, M> Scale<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
impl<T, M> Scale<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.source§impl<T, M> Translate<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
impl<T, M> Translate<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
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
.