pub struct SurfaceMesh3D { /* private fields */ }Expand description
Concrete 3D surface mesh implementation referencing polygon faces through ids.
Implementations§
Source§impl SurfaceMesh3D
impl SurfaceMesh3D
Sourcepub fn new(
face_ids: Vec<FaceId>,
vertex_table: SharedGeometryTable<PointId, CoordinateVector3D>,
face_table: SharedGeometryTable<FaceId, PolygonFace3D>,
) -> Self
pub fn new( face_ids: Vec<FaceId>, vertex_table: SharedGeometryTable<PointId, CoordinateVector3D>, face_table: SharedGeometryTable<FaceId, PolygonFace3D>, ) -> Self
Creates a surface mesh from ordered face ids and shared point and face tables.
Faces are resolved lazily through face_table, and each face in turn resolves its vertices
through vertex_table. This concrete type assumes the faces describe the boundary surface.
Trait Implementations§
Source§impl Clone for SurfaceMesh3D
impl Clone for SurfaceMesh3D
Source§impl Debug for SurfaceMesh3D
impl Debug for SurfaceMesh3D
Source§impl Display for SurfaceMesh3D
impl Display for SurfaceMesh3D
impl Eq for SurfaceMesh3D
impl GeometricPrimitive for SurfaceMesh3D
impl GeometricPrimitive3D for SurfaceMesh3D
Source§impl HasEdges for SurfaceMesh3D
impl HasEdges for SurfaceMesh3D
Source§impl<'a> HasFaces<'a> for SurfaceMesh3D
impl<'a> HasFaces<'a> for SurfaceMesh3D
Source§type Point = CoordinateVector3D
type Point = CoordinateVector3D
Point primitive referenced by the stored faces.
Source§type Normal = UnitVector3D
type Normal = UnitVector3D
Unit normal type used by the stored faces.
Source§type Face = PolygonFace3D
type Face = PolygonFace3D
Polygon face primitive stored in the face table.
Source§type FaceTable = Rc<RefCell<HashGeometryTable<FaceId, PolygonFace3D>>>
type FaceTable = Rc<RefCell<HashGeometryTable<FaceId, PolygonFace3D>>>
Borrowed face-table type.
Source§fn face_table(&self) -> &Self::FaceTable
fn face_table(&self) -> &Self::FaceTable
Returns an immutable reference to the face table.
Source§fn face_table_mut(&mut self) -> &mut Self::FaceTable
fn face_table_mut(&mut self) -> &mut Self::FaceTable
Returns a mutable reference to the face table.
Source§fn set_face_table(&mut self, table: &'a mut Self::FaceTable)
fn set_face_table(&mut self, table: &'a mut Self::FaceTable)
Rebinds the implementor to a different borrowed face table.
Source§fn face_table_size(&self) -> usize
fn face_table_size(&self) -> usize
Returns the number of entries in the face table.
Source§fn contains_face(&self, id: &FaceId) -> bool
fn contains_face(&self, id: &FaceId) -> bool
Returns
true if the face table contains id.Source§impl<'a> HasVertices<'a> for SurfaceMesh3D
impl<'a> HasVertices<'a> for SurfaceMesh3D
Source§type Vertex = CoordinateVector3D
type Vertex = CoordinateVector3D
Point primitive stored in the vertex table.
Source§type VertexTable = Rc<RefCell<HashGeometryTable<PointId, CoordinateVector3D>>>
type VertexTable = Rc<RefCell<HashGeometryTable<PointId, CoordinateVector3D>>>
Borrowed point-table type.
Source§fn vertex_table(&self) -> &Self::VertexTable
fn vertex_table(&self) -> &Self::VertexTable
Returns an immutable reference to the vertex table.
Source§fn vertex_table_mut(&mut self) -> &mut Self::VertexTable
fn vertex_table_mut(&mut self) -> &mut Self::VertexTable
Returns a mutable reference to the vertex table.
Source§fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
fn set_vertex_table(&mut self, table: &'a mut Self::VertexTable)
Rebinds the implementor to a different borrowed vertex table.
Source§fn vertex_table_size(&self) -> usize
fn vertex_table_size(&self) -> usize
Returns the number of entries in the vertex table.
Source§fn contains_vertex(&self, id: &PointId) -> bool
fn contains_vertex(&self, id: &PointId) -> bool
Returns
true if the vertex table contains id.Source§impl Hash for SurfaceMesh3D
impl Hash for SurfaceMesh3D
Source§impl<'a> IsMesh<'a, CoordinateVector3D, UnitVector3D> for SurfaceMesh3D
impl<'a> IsMesh<'a, CoordinateVector3D, UnitVector3D> for SurfaceMesh3D
Source§fn face_ids(&self) -> Box<dyn Iterator<Item = FaceId> + '_>
fn face_ids(&self) -> Box<dyn Iterator<Item = FaceId> + '_>
Returns the ordered face-table ids that participate in this mesh.
Source§fn set_face_id(
&mut self,
index: usize,
face_id: FaceId,
) -> Result<(), ErrorsJSL>
fn set_face_id( &mut self, index: usize, face_id: FaceId, ) -> Result<(), ErrorsJSL>
Replaces the face-table id at the given mesh face position.
Source§fn surface_area(&self) -> GeometryMeasure
fn surface_area(&self) -> GeometryMeasure
Returns the total surface area of the mesh.
Source§fn face_count(&self) -> usize
fn face_count(&self) -> usize
Returns the number of faces in the mesh.
Source§fn face(&self, index: usize) -> Option<<Self as HasFaces<'a>>::Face>
fn face(&self, index: usize) -> Option<<Self as HasFaces<'a>>::Face>
Resolves and returns a face by mesh-local position.
Source§fn face_normal(&self, index: usize) -> Option<N>
fn face_normal(&self, index: usize) -> Option<N>
Returns the normal associated with a face, if present.
Auto Trait Implementations§
impl !RefUnwindSafe for SurfaceMesh3D
impl !Send for SurfaceMesh3D
impl !Sync for SurfaceMesh3D
impl !UnwindSafe for SurfaceMesh3D
impl Freeze for SurfaceMesh3D
impl Unpin for SurfaceMesh3D
impl UnsafeUnpin for SurfaceMesh3D
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
Mutably borrows from an owned value. Read more