BRIDGES
  • Articles
  • BRIDGES
Search Results for

    Show / Hide Table of Contents
    • Settings
    • LinearAlgebra
      • Vectors
        • DenseVector
        • SparseVector
        • Vector
      • Factorisation
        • SparseQR
      • Matrices
        • DenseMatrix
        • Matrix
        • SparseMatrix
        • Sparse
          • CompressedColumn
          • CompressedRow
        • Storage
          • DictionaryOfKeys
    • Algebra
      • Measure
        • IDotProduct<TSelf, TValue>
        • IMetric<TSelf>
        • INorm<TSelf>
      • Sets
        • IGroupAction<TSelf, TValue>
      • Fundamentals
        • IAddable<T>
    • Solvers
      • GuidedProjection
        • Energy
        • GuidedProjectionAlgorithm
        • LinearisedConstraint
        • QuadraticConstraint
        • VariableSet
        • EnergyTypes
          • SegmentOrthogonality
          • SegmentParallelity
        • Interfaces
          • IEnergyType
          • ILinearisedConstraintType
          • IQuadraticConstraintType
        • QuadraticConstraintTypes
          • CoherentLength
          • LowerBound
          • UpperBound
          • VectorLength
    • Arithmetic
      • Polynomials
        • Multivariate
          • Monomial
          • Polynomial
        • Univariate
          • Polynomial
          • Specials
            • Bernstein
            • BSpline
      • Numbers
        • Complex
        • Quaternion
        • Real
    • Geometry
      • Euclidean3D
        • Basis
        • BSplineCurve
        • BSplineSurface
        • Circle
        • Frame
        • Line
        • NurbsCurve
        • NurbsSurface
        • Plane
        • Point
        • Polyline
        • Ray
        • Segment
        • Sphere
        • Vector
      • Kernel
        • BSplineCurve<TPoint>
        • BSplineSurface<TPoint>
        • CurveParameterFormat
        • IGeometricallyEquatable<T>
      • Projective3D
        • Point
    • DataStructures
      • PolyhedralMeshes
        • IEdge<TPosition>
        • IFace<TPosition>
        • IMesh<TPosition>
        • IVertex<TPosition>
        • FaceVertexMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>
        • Abstract
          • Edge<TPosition, TVertex, TEdge, TFace>
          • Face<TPosition, TVertex, TEdge, TFace>
          • Mesh<TPosition, TVertex, TEdge, TFace>
          • Vertex<TPosition, TVertex, TEdge, TFace>
        • HalfedgeMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Halfedge<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>

    Class Mesh<TPosition, TVertex, TEdge, TFace>

    Abstract class for a polyhedral mesh data structure.

    Inheritance
    Object
    Mesh<TPosition, TVertex, TEdge, TFace>
    Mesh<TPosition>
    Mesh<TPosition>
    Implements
    IMesh<TPosition>
    ICloneable
    Namespace: BRIDGES.DataStructures.PolyhedralMeshes.Abstract
    Assembly: BRIDGES.dll
    Syntax
    public abstract class Mesh<TPosition, TVertex, TEdge, TFace> : object, IMesh<TPosition> where TPosition : IEquatable<TPosition> where TVertex : Vertex<TPosition, TVertex, TEdge, TFace> where TEdge : Edge<TPosition, TVertex, TEdge, TFace> where TFace : Face<TPosition, TVertex, TEdge, TFace>
    Type Parameters
    Name Description
    TPosition

    Type for the position of the vertex.

    TVertex

    Type of vertex for the mesh.

    TEdge

    Type of vertex for the mesh.

    TFace

    Type of vertex for the mesh.

    Constructors

    | Improve this Doc View Source

    Mesh()

    Initialises a new instance of the Mesh<TPosition, TVertex, TEdge, TFace> class.

    Declaration
    protected Mesh()

    Properties

    | Improve this Doc View Source

    EdgeCount

    Gets the number of edges in the current mesh.

    Declaration
    public abstract int EdgeCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    FaceCount

    Gets the number of faces in the current mesh.

    Declaration
    public abstract int FaceCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    VertexCount

    Gets the number of vertices in the current mesh.

    Declaration
    public abstract int VertexCount { get; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc View Source

    AddEdge(Int32, Int32)

    Adds a new edge to the current mesh.

    Declaration
    protected TEdge AddEdge(int startIndex, int endIndex)
    Parameters
    Type Name Description
    Int32 startIndex

    Index of the start vertex for the new edge.

    Int32 endIndex

    Index of the end vertex for the new edge.

    Returns
    Type Description
    TEdge

    The new edge if it was added, null otherwise.

    | Improve this Doc View Source

    AddFace(TVertex, TVertex, TVertex, TVertex)

    Adds a new quadrangular face to the current mesh.

    Declaration
    public TFace AddFace(TVertex vertexA, TVertex vertexB, TVertex vertexC, TVertex vertexD)
    Parameters
    Type Name Description
    TVertex vertexA

    First vertex for the new face.

    TVertex vertexB

    Second vertex for the new face.

    TVertex vertexC

    Third vertex for the new face.

    TVertex vertexD

    Fourth vertex for the new face.

    Returns
    Type Description
    TFace

    The newly created quadrangular face.

    | Improve this Doc View Source

    AddFace(TVertex, TVertex, TVertex)

    Adds a new triangular face to the current mesh.

    Declaration
    public TFace AddFace(TVertex vertexA, TVertex vertexB, TVertex vertexC)
    Parameters
    Type Name Description
    TVertex vertexA

    First vertex for the new face.

    TVertex vertexB

    Second vertex for the new face.

    TVertex vertexC

    Third vertex for the new face.

    Returns
    Type Description
    TFace

    The newly created triangular face.

    | Improve this Doc View Source

    AddFace(List<TVertex>)

    Adds a new face to the current mesh from its vertices.

    Declaration
    public abstract TFace AddFace(List<TVertex> vertices)
    Parameters
    Type Name Description
    List<TVertex> vertices

    Ordered list of the face's vertex.

    Returns
    Type Description
    TFace

    The new face if it was added, null otherwise.

    | Improve this Doc View Source

    AddFace(List<Int32>)

    Adds a new face to the current mesh.

    Declaration
    public TFace AddFace(List<int> indices)
    Parameters
    Type Name Description
    List<Int32> indices

    Ordered list of the face's vertex indices.

    Returns
    Type Description
    TFace

    The newly created face.

    | Improve this Doc View Source

    AddFace(Int32, Int32, Int32, Int32)

    Adds a new quadrangular face to the current mesh.

    Declaration
    public TFace AddFace(int indexA, int indexB, int indexC, int indexD)
    Parameters
    Type Name Description
    Int32 indexA

    Index of the first vertex for the new face.

    Int32 indexB

    Index of the second vertex for the new face.

    Int32 indexC

    Index of the third vertex for the new face.

    Int32 indexD

    Index of the fourth vertex for the new face.

    Returns
    Type Description
    TFace

    The newly created quadrangular face.

    | Improve this Doc View Source

    AddFace(Int32, Int32, Int32)

    Adds a new triangular face to the current mesh.

    Declaration
    public TFace AddFace(int indexA, int indexB, int indexC)
    Parameters
    Type Name Description
    Int32 indexA

    Index of the first vertex for the new face.

    Int32 indexB

    Index of the second vertex for the new face.

    Int32 indexC

    Index of the third vertex for the new face.

    Returns
    Type Description
    TFace

    The newly created triangular face.

    | Improve this Doc View Source

    AddVertex(TPosition)

    Adds a vertex in the mesh from its position.

    Declaration
    public abstract TVertex AddVertex(TPosition position)
    Parameters
    Type Name Description
    TPosition position

    Position of the vertex.

    Returns
    Type Description
    TVertex

    The new vertex if it was added, null otherwise.

    | Improve this Doc View Source

    CleanMesh(Boolean)

    Cleans the current mesh by reindexing the faces, edges and vertices.

    Declaration
    public abstract void CleanMesh(bool cullIsolated = true)
    Parameters
    Type Name Description
    Boolean cullIsolated

    Evaluates whether isolated members should be removed in the process.

    | Improve this Doc View Source

    Clone()

    Creates a new object that is a deep copy of the current instance.

    Declaration
    public abstract object Clone()
    Returns
    Type Description
    Object

    The new object that is a deep copy of the current instance.

    | Improve this Doc View Source

    EdgeBetween(TVertex, TVertex)

    Looks for the edge between vertexA and vertexB.

    Declaration
    public virtual TEdge EdgeBetween(TVertex vertexA, TVertex vertexB)
    Parameters
    Type Name Description
    TVertex vertexA

    First end vertex of the edge.

    TVertex vertexB

    Second end vertex of the edge.

    Returns
    Type Description
    TEdge

    The edge if it exists, null otherwise.

    | Improve this Doc View Source

    EdgeBetween(Int32, Int32)

    Looks for the edge between two vertices.

    Declaration
    public TEdge EdgeBetween(int indexA, int indexB)
    Parameters
    Type Name Description
    Int32 indexA

    Index of the first end vertex of the edge.

    Int32 indexB

    Index of the second end vertex of the edge.

    Returns
    Type Description
    TEdge

    The edge if it exists, null otherwise.

    | Improve this Doc View Source

    Equals(Object)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    EraseEdge(TEdge)

    Erases the edge from the mesh. The mesh may not be manifold after this operation.

    Declaration
    public abstract void EraseEdge(TEdge edge)
    Parameters
    Type Name Description
    TEdge edge

    Edge to erase.

    | Improve this Doc View Source

    EraseEdge(Int32)

    Erases the edge at the given index in the mesh. The mesh may be non-manifold after this operation.

    Declaration
    public void EraseEdge(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the edge to erase.

    | Improve this Doc View Source

    EraseFace(TFace)

    Erases the face from the mesh. The mesh may not be manifold after this operation.

    Declaration
    public abstract void EraseFace(TFace face)
    Parameters
    Type Name Description
    TFace face

    Face to erase.

    | Improve this Doc View Source

    EraseFace(Int32)

    Erases the face at the given index in the mesh. The mesh may be non-manifold after this operation.

    Declaration
    public void EraseFace(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the face to erase.

    | Improve this Doc View Source

    EraseVertex(TVertex)

    Erases the vertex from the mesh. Every reference to this vertex should be deleted before it is erased.

    Declaration
    protected abstract void EraseVertex(TVertex vertex)
    Parameters
    Type Name Description
    TVertex vertex

    The vertex to erase.

    | Improve this Doc View Source

    EraseVertex(Int32)

    Erases the vertex at the given index in the mesh. Every reference to this vertex should be deleted before it is erased.

    Declaration
    public void EraseVertex(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the vertex to erase.

    | Improve this Doc View Source

    GetEdge(Int32)

    Returns the edge at the given index in the mesh.

    Declaration
    public abstract TEdge GetEdge(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    TEdge

    The edge at the given index in the mesh.

    | Improve this Doc View Source

    GetEdges()

    Returns the list of edges of the current mesh.

    Declaration
    public abstract IReadOnlyList<TEdge> GetEdges()
    Returns
    Type Description
    IReadOnlyList<TEdge>

    List of edges of the mesh.

    Remarks

    If some edges were removed from the mesh, the index of the edge in the returned list might not match the edge index in the mesh.
    The index of the edges in the mesh is accessible through the Index property.

    | Improve this Doc View Source

    GetFace(Int32)

    Returns the face at the given index in the mesh.

    Declaration
    public abstract TFace GetFace(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    TFace

    The face at the given index in the mesh.

    | Improve this Doc View Source

    GetFaces()

    Returns the list of faces of the current mesh.

    Declaration
    public abstract IReadOnlyList<TFace> GetFaces()
    Returns
    Type Description
    IReadOnlyList<TFace>

    List of faces of the mesh.

    Remarks

    If some faces were removed from the mesh, the index of the face in the returned list might not match the face index in the mesh.
    The index of the faces in the mesh is accessible through the Index property.

    | Improve this Doc View Source

    GetHashCode()

    Abstract class for a polyhedral mesh data structure.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    GetVertex(Int32)

    Returns the vertex at the given index in the mesh.

    Declaration
    public abstract TVertex GetVertex(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    TVertex

    The vertex at the given index in the mesh.

    | Improve this Doc View Source

    GetVertices()

    Returns the list of vertices of the current mesh.

    Declaration
    public abstract IReadOnlyList<TVertex> GetVertices()
    Returns
    Type Description
    IReadOnlyList<TVertex>

    List of vertices of the mesh.

    Remarks

    If some vertices were removed from the mesh, the index of the vertex in the returned list might not match the vertex index in the mesh.
    The index of the vertices in the mesh is accessible through the Index property.

    | Improve this Doc View Source

    RemoveEdge(TEdge)

    Removes the edge from the mesh by keeping the mesh manifold.

    Declaration
    public abstract void RemoveEdge(TEdge edge)
    Parameters
    Type Name Description
    TEdge edge

    Edge to remove.

    | Improve this Doc View Source

    RemoveEdge(Int32)

    Removes the edge at the given index in the mesh by keeping the mesh manifold.

    Declaration
    public void RemoveEdge(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the edge to remove.

    | Improve this Doc View Source

    RemoveFace(TFace)

    Removes the face from the mesh by keeping the mesh manifold.

    Declaration
    public abstract void RemoveFace(TFace face)
    Parameters
    Type Name Description
    TFace face

    Face to remove.

    | Improve this Doc View Source

    RemoveFace(Int32)

    Removes the face at the given index in the mesh by keeping the mesh manifold.

    Declaration
    public void RemoveFace(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the face to remove.

    | Improve this Doc View Source

    RemoveVertex(TVertex)

    Removes the vertex from the mesh by keeping the mesh manifold.

    Declaration
    public abstract void RemoveVertex(TVertex vertex)
    Parameters
    Type Name Description
    TVertex vertex

    Vertex to remove.

    | Improve this Doc View Source

    RemoveVertex(Int32)

    Removes the vertex at the given index in the mesh by keeping the mesh manifold.

    Declaration
    public void RemoveVertex(int index)
    Parameters
    Type Name Description
    Int32 index

    Index of the vertex to remove.

    | Improve this Doc View Source

    ToString()

    Abstract class for a polyhedral mesh data structure.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    TryGetEdge(Int32)

    Returns the edge at the given index in the mesh if it exists, null otherwise.

    Declaration
    public abstract TEdge TryGetEdge(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the edge to look for.

    Returns
    Type Description
    TEdge

    The edge if it exists, null otherwise.

    | Improve this Doc View Source

    TryGetFace(Int32)

    Returns the face at the given index in the mesh if it exists, null otherwise.

    Declaration
    public abstract TFace TryGetFace(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the face to look for.

    Returns
    Type Description
    TFace

    The face if it exists, null otherwise.

    | Improve this Doc View Source

    TryGetVertex(Int32)

    Returns the vertex at the given index in the mesh if it exists, null otherwise.

    Declaration
    public abstract TVertex TryGetVertex(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the vertex to look for.

    Returns
    Type Description
    TVertex

    The vertex if it exists, null otherwise.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IMesh<TPosition>.AddEdge(Int32, Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IEdge<TPosition> IMesh<TPosition>.AddEdge(int startIndex, int endIndex)
    Parameters
    Type Name Description
    Int32 startIndex
    Int32 endIndex
    Returns
    Type Description
    IEdge<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.AddFace(List<Int32>)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IFace<TPosition> IMesh<TPosition>.AddFace(List<int> indices)
    Parameters
    Type Name Description
    List<Int32> indices
    Returns
    Type Description
    IFace<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.AddFace(Int32, Int32, Int32, Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IFace<TPosition> IMesh<TPosition>.AddFace(int indexA, int indexB, int indexC, int indexD)
    Parameters
    Type Name Description
    Int32 indexA
    Int32 indexB
    Int32 indexC
    Int32 indexD
    Returns
    Type Description
    IFace<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.AddFace(Int32, Int32, Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IFace<TPosition> IMesh<TPosition>.AddFace(int indexA, int indexB, int indexC)
    Parameters
    Type Name Description
    Int32 indexA
    Int32 indexB
    Int32 indexC
    Returns
    Type Description
    IFace<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.AddVertex(TPosition)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IVertex<TPosition> IMesh<TPosition>.AddVertex(TPosition position)
    Parameters
    Type Name Description
    TPosition position
    Returns
    Type Description
    IVertex<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.EdgeBetween(Int32, Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IEdge<TPosition> IMesh<TPosition>.EdgeBetween(int indexA, int indexB)
    Parameters
    Type Name Description
    Int32 indexA
    Int32 indexB
    Returns
    Type Description
    IEdge<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.GetEdge(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IEdge<TPosition> IMesh<TPosition>.GetEdge(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IEdge<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.GetEdges()

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IReadOnlyList<IEdge<TPosition>> IMesh<TPosition>.GetEdges()
    Returns
    Type Description
    IReadOnlyList<IEdge<TPosition>>
    | Improve this Doc View Source

    IMesh<TPosition>.GetFace(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IFace<TPosition> IMesh<TPosition>.GetFace(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IFace<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.GetFaces()

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IReadOnlyList<IFace<TPosition>> IMesh<TPosition>.GetFaces()
    Returns
    Type Description
    IReadOnlyList<IFace<TPosition>>
    | Improve this Doc View Source

    IMesh<TPosition>.GetVertex(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IVertex<TPosition> IMesh<TPosition>.GetVertex(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IVertex<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.GetVertices()

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IReadOnlyList<IVertex<TPosition>> IMesh<TPosition>.GetVertices()
    Returns
    Type Description
    IReadOnlyList<IVertex<TPosition>>
    | Improve this Doc View Source

    IMesh<TPosition>.TryGetEdge(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IEdge<TPosition> IMesh<TPosition>.TryGetEdge(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IEdge<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.TryGetFace(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IFace<TPosition> IMesh<TPosition>.TryGetFace(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IFace<TPosition>
    | Improve this Doc View Source

    IMesh<TPosition>.TryGetVertex(Int32)

    Abstract class for a polyhedral mesh data structure.

    Declaration
    IVertex<TPosition> IMesh<TPosition>.TryGetVertex(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    IVertex<TPosition>

    Implements

    IMesh<TPosition>
    ICloneable
    • Improve this Doc
    • View Source
    In This Article
    Back to top By ENPC and the Build'In Platform