Struct rust_3d::Face3
[−]
[src]
pub struct Face3 { pub a: VId, pub b: VId, pub c: VId, }
Face3, a face defined by 3 indices (e.g. used for Mesh)
Fields
a: VId
b: VId
c: VId
Methods
impl Face3
[src]
Trait Implementations
impl<P> IsMesh<P, Face3> for Mesh3D<P> where
P: IsBuildable3D + Clone,
[src]
P: IsBuildable3D + Clone,
fn num_faces(&self) -> usize
[src]
Should return the number of faces within the mesh
fn num_vertices(&self) -> usize
[src]
Should return the number of vertices within the mesh
fn face_vertex_ids(&self, faceid: FId) -> Result<Face3>
[src]
Should return the ids of vertices of the given face
fn face_vertices(&self, faceid: FId) -> Result<(P, P, P)>
[src]
Should return the vertices of the given face
fn vertex(&self, vertexid: VId) -> Result<P>
[src]
Should return the vertex with the given id
impl<P> IsEditableMesh<P, Face3> for Mesh3D<P> where
P: IsEditable3D + IsBuildable3D + Clone,
[src]
P: IsEditable3D + IsBuildable3D + Clone,
fn add_vertex(&mut self, vertex: P) -> VId
[src]
Should add a vertex to the end and return its id
fn change_vertex(&mut self, vid: VId, vertex: P) -> Result<()>
[src]
Should change vertex at vId to the given vertex returning an error on failure
fn add_face(&mut self, v1: P, v2: P, v3: P) -> FId
[src]
Should add a face with the 3 positions. Also should return the id of the new face
fn try_add_connection(&mut self, vid1: VId, vid2: VId, vid3: VId) -> Result<FId>
[src]
Should add a face to the mesh by connecting the vertices via their ids. Should return the id of the newly added face
impl<M, T> IsMesh<T, Face3> for SearchableMesh<M, T> where
M: IsMesh<T, Face3>,
[src]
M: IsMesh<T, Face3>,
fn num_faces(&self) -> usize
[src]
Should return the number of faces within the mesh
fn num_vertices(&self) -> usize
[src]
Should return the number of vertices within the mesh
fn face_vertex_ids(&self, faceid: FId) -> Result<Face3>
[src]
Should return the ids of vertices of the given face
fn face_vertices(&self, faceid: FId) -> Result<(T, T, T)>
[src]
Should return the vertices of the given face
fn vertex(&self, vertexid: VId) -> Result<T>
[src]
Should return the vertex with the given id
impl<M, T> IsSearchableMesh<T, Face3> for SearchableMesh<M, T> where
M: IsMesh<T, Face3>,
[src]
M: IsMesh<T, Face3>,
fn num_edges(&self) -> usize
[src]
Returns the number of edges within the mesh
fn edges_of_face(&self, faceid: FId) -> Result<(EId, EId, EId)>
[src]
Should return the edge ids of the given face. Error if id invalid
fn edges_originating_from_vertex(&self, vertexid: VId) -> Result<Vec<EId>>
[src]
Should return the edges originating at the given vertex (pointing away / having the vertex as tail). Error if id invalid
fn edges_ending_at_vertex(&self, vertexid: VId) -> Result<Vec<EId>>
[src]
Should return the edges ending at the given vertex (pointing to / having the vertex as head). Error if id invalid
fn edges_of_vertex(&self, vertexid: VId) -> Result<Vec<EId>>
[src]
Should return the edges connecting with the vertex. Error if id invalid
fn edge_tail(&self, edgeid: EId) -> Result<VId>
[src]
Should return the vertex id of the edge's tail. Error if id invalid
fn edge_head(&self, edgeid: EId) -> Result<VId>
[src]
Should return the vertex id of the edge's head. Error if id invalid
fn edge_next(&self, edgeid: EId) -> Result<EId>
[src]
Should return the edge id of the next edge. Error if id invalid
fn edge_prev(&self, edgeid: EId) -> Result<EId>
[src]
Should return the edge id of the previous edge. Error if id invalid
fn edge_twin(&self, edgeid: EId) -> Result<Option<EId>>
[src]
Should return the edge id of the twin edge. Error if id invalid, None if there is none
fn edge_face(&self, edgeid: EId) -> Result<FId>
[src]
Should return the face id of the edges face. Error if id invalid
fn faces_of_vertex(&self, vertexid: VId) -> Result<Vec<FId>>
[src]
Returns faces a vertex is part of. Error if id invalid
fn face_edge_neighbours(&self, faceid: FId) -> Result<Vec<FId>>
[src]
Returns the neighbouring faces of the given face which share the same edges. Error if id invalid
fn face_vertex_neighbours(&self, faceid: FId) -> Result<Vec<FId>>
[src]
Returns the neighbouring faces of the given face which share the same vertices. Error if id invalid
impl Debug for Face3
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Face3
[src]
fn eq(&self, __arg_0: &Face3) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Face3) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Face3
[src]
fn partial_cmp(&self, __arg_0: &Face3) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Face3) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Face3) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Face3) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Face3) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Clone for Face3
[src]
fn clone(&self) -> Face3
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Face3
[src]
impl Ord for Face3
[src]
fn cmp(&self, __arg_0: &Face3) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for Face3
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl IsTopologyUnit for Face3
[src]
fn n_vids() -> usize
[src]
Should return the number of indices a unit is defined with. (e.g. 3 for a tri mesh)
fn get_vid(&self, index: usize) -> Result<VId>
[src]
Should return the vertex id of the nth element of this unit. Failure if index out of bounds