Search Results for

    Show / Hide Table of Contents

    Class Remesher

    Inheritance
    Object
    MeshRefinerBase
    Remesher
    EdgeLoopRemesher
    RegionRemesher
    Inherited Members
    MeshRefinerBase.mesh
    MeshRefinerBase.constraints
    MeshRefinerBase.AllowCollapseFixedVertsWithSameSetID
    MeshRefinerBase.EdgeFlipTolerance
    MeshRefinerBase.edge_flip_tol
    MeshRefinerBase.Mesh
    MeshRefinerBase.Constraints
    MeshRefinerBase.SetExternalConstraints(MeshConstraints)
    MeshRefinerBase.Progress
    MeshRefinerBase.Cancelled()
    MeshRefinerBase.edge_flip_metric(Vector3d, Vector3d)
    MeshRefinerBase.collapse_creates_flip_or_invalid(Int32, Int32, Vector3d, Int32, Int32)
    MeshRefinerBase.flip_inverts_normals(Int32, Int32, Int32, Int32, Int32)
    MeshRefinerBase.can_collapse_constraints(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
    MeshRefinerBase.can_collapse_vtx(Int32, Int32, Int32, Int32)
    MeshRefinerBase.vertex_is_fixed(Int32)
    MeshRefinerBase.vertex_is_constrained(Int32)
    MeshRefinerBase.get_vertex_constraint(Int32)
    MeshRefinerBase.get_vertex_constraint(Int32, VertexConstraint)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public class Remesher : MeshRefinerBase

    Constructors

    Remesher()

    Declaration
    protected Remesher()

    Remesher(DMesh3)

    Declaration
    public Remesher(DMesh3 m)
    Parameters
    Type Name Description
    DMesh3 m

    Fields

    CustomSmoothF

    Declaration
    public Func<DMesh3, int, double, Vector3d> CustomSmoothF
    Field Value
    Type Description
    Func<DMesh3, Int32, Double, Vector3d>

    DebugEdges

    Declaration
    public List<int> DebugEdges
    Field Value
    Type Description
    List<Int32>

    ENABLE_DEBUG_CHECKS

    Declaration
    public bool ENABLE_DEBUG_CHECKS
    Field Value
    Type Description
    Boolean

    ENABLE_PROFILING

    Declaration
    public bool ENABLE_PROFILING
    Field Value
    Type Description
    Boolean

    EnableCollapses

    Declaration
    public bool EnableCollapses
    Field Value
    Type Description
    Boolean

    EnableFlips

    Declaration
    public bool EnableFlips
    Field Value
    Type Description
    Boolean

    EnableParallelProjection

    Declaration
    public bool EnableParallelProjection
    Field Value
    Type Description
    Boolean

    EnableParallelSmooth

    Declaration
    public bool EnableParallelSmooth
    Field Value
    Type Description
    Boolean

    EnableSmoothing

    Declaration
    public bool EnableSmoothing
    Field Value
    Type Description
    Boolean

    EnableSmoothInPlace

    Declaration
    public bool EnableSmoothInPlace
    Field Value
    Type Description
    Boolean

    EnableSplits

    Declaration
    public bool EnableSplits
    Field Value
    Type Description
    Boolean

    MaxEdgeLength

    Declaration
    public double MaxEdgeLength
    Field Value
    Type Description
    Double

    MinEdgeLength

    Declaration
    public double MinEdgeLength
    Field Value
    Type Description
    Double

    ModifiedEdgesLastPass

    Number of edges that were modified in previous Remesh pass. If this number gets small relative to edge count, you have probably converged (ish)

    Declaration
    public int ModifiedEdgesLastPass
    Field Value
    Type Description
    Int32

    PreventNormalFlips

    Declaration
    public bool PreventNormalFlips
    Field Value
    Type Description
    Boolean

    ProjectionMode

    Declaration
    public Remesher.TargetProjectionMode ProjectionMode
    Field Value
    Type Description
    Remesher.TargetProjectionMode

    SmoothSpeedT

    Declaration
    public double SmoothSpeedT
    Field Value
    Type Description
    Double

    SmoothType

    Declaration
    public Remesher.SmoothTypes SmoothType
    Field Value
    Type Description
    Remesher.SmoothTypes

    vBufferV

    Declaration
    protected DVector<Vector3d> vBufferV
    Field Value
    Type Description
    DVector<Vector3d>

    VertexControlF

    Declaration
    public Func<int, Remesher.VertexControl> VertexControlF
    Field Value
    Type Description
    Func<Int32, Remesher.VertexControl>

    vModifiedV

    Declaration
    protected BitArray vModifiedV
    Field Value
    Type Description
    BitArray

    Properties

    ProjectionTarget

    Declaration
    public IProjectionTarget ProjectionTarget { get; }
    Property Value
    Type Description
    IProjectionTarget

    Methods

    ApplyVertexBuffer(Boolean)

    Declaration
    protected virtual void ApplyVertexBuffer(bool bParallel)
    Parameters
    Type Name Description
    Boolean bParallel

    BasicRemeshPass()

    Linear edge-refinement pass, followed by smoothing and projection

    • Edges are processed in prime-modulo-order to break symmetry
    • smoothing is done in parallel if EnableParallelSmooth = true
    • Projection pass if ProjectionMode == AfterRefinement
    • number of modified edges returned in ModifiedEdgesLastPass
    Declaration
    public virtual void BasicRemeshPass()

    begin_collapse()

    Declaration
    protected virtual void begin_collapse()

    begin_flip()

    Declaration
    protected virtual void begin_flip()

    begin_ops()

    Declaration
    protected virtual void begin_ops()

    begin_pass()

    Declaration
    protected virtual void begin_pass()

    begin_project()

    Declaration
    protected virtual void begin_project()

    begin_smooth()

    Declaration
    protected virtual void begin_smooth()

    begin_split()

    Declaration
    protected virtual void begin_split()

    ComputeSmoothedVertexPos(Int32, Func<DMesh3, Int32, Double, Vector3d>, out Boolean)

    This computes smoothed positions w/ proper constraints/etc. Does not modify mesh.

    Declaration
    protected virtual Vector3d ComputeSmoothedVertexPos(int vID, Func<DMesh3, int, double, Vector3d> smoothFunc, out bool bModified)
    Parameters
    Type Name Description
    Int32 vID
    Func<DMesh3, Int32, Double, Vector3d> smoothFunc
    Boolean bModified
    Returns
    Type Description
    Vector3d

    DoDebugChecks()

    Declaration
    protected virtual void DoDebugChecks()

    end_collapse()

    Declaration
    protected virtual void end_collapse()

    end_flip()

    Declaration
    protected virtual void end_flip()

    end_ops()

    Declaration
    protected virtual void end_ops()

    end_pass()

    Declaration
    protected virtual void end_pass()

    end_project()

    Declaration
    protected virtual void end_project()

    end_smooth()

    Declaration
    protected virtual void end_smooth()

    end_split()

    Declaration
    protected virtual void end_split()

    FullProjectionPass()

    Declaration
    protected virtual void FullProjectionPass()

    FullSmoothPass_Buffer(Boolean)

    Declaration
    protected virtual void FullSmoothPass_Buffer(bool bParallel)
    Parameters
    Type Name Description
    Boolean bParallel

    FullSmoothPass_InPlace(Boolean)

    Declaration
    protected virtual void FullSmoothPass_InPlace(bool bParallel)
    Parameters
    Type Name Description
    Boolean bParallel

    get_projected_collapse_position(Int32, Vector3d)

    Declaration
    protected virtual Vector3d get_projected_collapse_position(int vid, Vector3d vNewPos)
    Parameters
    Type Name Description
    Int32 vid
    Vector3d vNewPos
    Returns
    Type Description
    Vector3d

    InitializeVertexBufferForPass()

    Declaration
    protected virtual void InitializeVertexBufferForPass()

    next_edge(Int32, out Boolean)

    Declaration
    protected virtual int next_edge(int cur_eid, out bool bDone)
    Parameters
    Type Name Description
    Int32 cur_eid
    Boolean bDone
    Returns
    Type Description
    Int32

    OnEdgeCollapse(Int32, Int32, Int32, DMesh3.EdgeCollapseInfo)

    Declaration
    protected virtual void OnEdgeCollapse(int edgeID, int va, int vb, DMesh3.EdgeCollapseInfo collapseInfo)
    Parameters
    Type Name Description
    Int32 edgeID
    Int32 va
    Int32 vb
    DMesh3.EdgeCollapseInfo collapseInfo

    OnEdgeSplit(Int32, Int32, Int32, DMesh3.EdgeSplitInfo)

    Declaration
    protected virtual void OnEdgeSplit(int edgeID, int va, int vb, DMesh3.EdgeSplitInfo splitInfo)
    Parameters
    Type Name Description
    Int32 edgeID
    Int32 va
    Int32 vb
    DMesh3.EdgeSplitInfo splitInfo

    Precompute()

    we can vastly speed things up if we precompute some invariants. You need to re-run this if you are changing the mesh externally between remesh passes, otherwise you will get weird results. But you will probably still come out ahead, computation-time-wise

    Declaration
    public virtual void Precompute()

    ProcessEdge(Int32)

    Declaration
    protected virtual Remesher.ProcessResult ProcessEdge(int edgeID)
    Parameters
    Type Name Description
    Int32 edgeID
    Returns
    Type Description
    Remesher.ProcessResult

    project_vertex(Int32, IProjectionTarget)

    Declaration
    protected virtual void project_vertex(int vID, IProjectionTarget targetIn)
    Parameters
    Type Name Description
    Int32 vID
    IProjectionTarget targetIn

    project_vertices()

    Declaration
    protected virtual IEnumerable<int> project_vertices()
    Returns
    Type Description
    IEnumerable<Int32>

    SetProjectionTarget(IProjectionTarget)

    Declaration
    public void SetProjectionTarget(IProjectionTarget target)
    Parameters
    Type Name Description
    IProjectionTarget target

    SetTargetEdgeLength(Double)

    Set min/max edge-lengths to sane values for given target edge length

    Declaration
    public void SetTargetEdgeLength(double fLength)
    Parameters
    Type Name Description
    Double fLength

    smooth_vertices()

    Declaration
    protected virtual IEnumerable<int> smooth_vertices()
    Returns
    Type Description
    IEnumerable<Int32>

    start_edges()

    Declaration
    protected virtual int start_edges()
    Returns
    Type Description
    Int32

    update_after_split(Int32, Int32, Int32, ref DMesh3.EdgeSplitInfo)

    Declaration
    protected virtual void update_after_split(int edgeID, int va, int vb, ref DMesh3.EdgeSplitInfo splitInfo)
    Parameters
    Type Name Description
    Int32 edgeID
    Int32 va
    Int32 vb
    DMesh3.EdgeSplitInfo splitInfo
    In This Article
    Back to top ViRGIS VR GIS