Struct rust_3d::SearchableMesh
[−]
[src]
pub struct SearchableMesh<M, T> where
M: IsMesh<T, Face3>, { /* fields omitted */ }
SearchableMesh, transforms IsMesh to IsSearchableMesh
Methods
impl<M, T> SearchableMesh<M, T> where
M: IsMesh<T, Face3>,
[src]
M: IsMesh<T, Face3>,
pub fn new(mesh: M) -> Self
[src]
Creates a new SearchableMesh3D from an IsMesh3D This only stays valid if IMesh3D is not changed after creation The mesh must be manifold (@todo ensure via types?)
pub fn ensure_face_id(&self, id: FId) -> Result<()>
[src]
Fails if the vertex ID is out of bounds
Trait Implementations
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<M, T> HasBoundingBox3D for SearchableMesh<M, T> where
M: IsMesh<T, Face3> + HasBoundingBox3D,
[src]
M: IsMesh<T, Face3> + HasBoundingBox3D,
fn bounding_box(&self) -> Result<BoundingBox3D>
[src]
Should return the bounding box as a pair of two points. The first point should be the minimum for all coordinates, the second the maximum for all coordinates
impl<M, T> HasCenterOfGravity3D for SearchableMesh<M, T> where
M: IsMesh<T, Face3> + HasCenterOfGravity3D,
[src]
M: IsMesh<T, Face3> + HasCenterOfGravity3D,
fn center_of_gravity(&self) -> Result<Point3D>
[src]
Should return the center of gravity
Auto Trait Implementations
impl<M, T> Send for SearchableMesh<M, T> where
M: Send,
T: Send,
M: Send,
T: Send,
impl<M, T> Sync for SearchableMesh<M, T> where
M: Sync,
T: Sync,
M: Sync,
T: Sync,