Trait meshx::mesh::vertex_positions::VertexPositions
source · pub trait VertexPositions {
type Element;
// Required methods
fn vertex_positions(&self) -> &[Self::Element];
fn vertex_positions_mut(&mut self) -> &mut [Self::Element];
// Provided methods
fn vertex_position_iter(&self) -> Iter<'_, Self::Element> { ... }
fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element> { ... }
fn vertex_position<VI>(&self, vidx: VI) -> Self::Element
where VI: Into<VertexIndex>,
Self::Element: Clone { ... }
}
Expand description
An “intrinsic” trait for accessing vertex positions on a mesh.
This trait can be implemented automatically by deriving the virtual “Intrinsic” trait and
taggin the field with the vertex positions field with the #[intrinsic(VertexPositions)]
attribute. Make sure that VertexPositions
is in scope, or specify the path in the argument to
the intrinsic
attribute directly.
Required Associated Types§
Required Methods§
sourcefn vertex_positions(&self) -> &[Self::Element]
fn vertex_positions(&self) -> &[Self::Element]
Vertex positions as a slice of triplets.
sourcefn vertex_positions_mut(&mut self) -> &mut [Self::Element]
fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
Vertex positions as a mutable slice of triplets.
Provided Methods§
sourcefn vertex_position_iter(&self) -> Iter<'_, Self::Element>
fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
Vertex iterator.
sourcefn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
Mutable vertex iterator.
sourcefn vertex_position<VI>(&self, vidx: VI) -> Self::Element
fn vertex_position<VI>(&self, vidx: VI) -> Self::Element
Vertex accessor.
Object Safety§
This trait is not object safe.