Class Remesher
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class Remesher : MeshRefinerBase
Constructors
Remesher()
Declaration
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
DebugEdges
Declaration
public List<int> DebugEdges
Field Value
ENABLE_DEBUG_CHECKS
Declaration
public bool ENABLE_DEBUG_CHECKS
Field Value
ENABLE_PROFILING
Declaration
public bool ENABLE_PROFILING
Field Value
EnableCollapses
Declaration
public bool EnableCollapses
Field Value
EnableFlips
Declaration
Field Value
EnableParallelProjection
Declaration
public bool EnableParallelProjection
Field Value
EnableParallelSmooth
Declaration
public bool EnableParallelSmooth
Field Value
EnableSmoothing
Declaration
public bool EnableSmoothing
Field Value
EnableSmoothInPlace
Declaration
public bool EnableSmoothInPlace
Field Value
EnableSplits
Declaration
Field Value
MaxEdgeLength
Declaration
public double MaxEdgeLength
Field Value
MinEdgeLength
Declaration
public double MinEdgeLength
Field Value
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
PreventNormalFlips
Declaration
public bool PreventNormalFlips
Field Value
ProjectionMode
Declaration
public Remesher.TargetProjectionMode ProjectionMode
Field Value
SmoothSpeedT
Declaration
public double SmoothSpeedT
Field Value
SmoothType
Declaration
public Remesher.SmoothTypes SmoothType
Field Value
vBufferV
Declaration
protected DVector<Vector3d> vBufferV
Field Value
VertexControlF
Declaration
public Func<int, Remesher.VertexControl> VertexControlF
Field Value
vModifiedV
Declaration
protected BitArray vModifiedV
Field Value
Type |
Description |
BitArray |
|
Properties
ProjectionTarget
Declaration
public IProjectionTarget ProjectionTarget { get; }
Property Value
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
Returns
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
Returns
InitializeVertexBufferForPass()
Declaration
protected virtual void InitializeVertexBufferForPass()
next_edge(Int32, out Boolean)
Declaration
protected virtual int next_edge(int cur_eid, out bool bDone)
Parameters
Returns
OnEdgeCollapse(Int32, Int32, Int32, DMesh3.EdgeCollapseInfo)
Declaration
protected virtual void OnEdgeCollapse(int edgeID, int va, int vb, DMesh3.EdgeCollapseInfo collapseInfo)
Parameters
OnEdgeSplit(Int32, Int32, Int32, DMesh3.EdgeSplitInfo)
Declaration
protected virtual void OnEdgeSplit(int edgeID, int va, int vb, DMesh3.EdgeSplitInfo splitInfo)
Parameters
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
project_vertex(Int32, IProjectionTarget)
Declaration
protected virtual void project_vertex(int vID, IProjectionTarget targetIn)
Parameters
project_vertices()
Declaration
protected virtual IEnumerable<int> project_vertices()
Returns
SetProjectionTarget(IProjectionTarget)
Declaration
public void SetProjectionTarget(IProjectionTarget target)
Parameters
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
start_edges()
Declaration
protected virtual int start_edges()
Returns
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