Class MeshWindingNumberGrid
Sample mesh winding number (MWN) on a discrete grid. Can sample full grid, or
compute MWN values along a specific iso-contour and then fill in rest of grid
with correctly-signed values via fast sweeping (this is the default)
TODO:
- I think we are over-exploring the grid most of the time. eg along an x-ray that
intersects the surface, we only need at most 2 cells, but we are computing at least 3,
and possibly 5.
- it may be better to use something like bloomenthal polygonizer continuation? where we
are keeping track of active edges instead of active cells?
Inheritance
MeshWindingNumberGrid
Namespace: gs
Assembly: cs.temp.dll.dll
Syntax
public class MeshWindingNumberGrid
Constructors
MeshWindingNumberGrid(DMesh3, DMeshAABBTree3, Double)
Declaration
public MeshWindingNumberGrid(DMesh3 mesh, DMeshAABBTree3 spatial, double cellSize)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
DMeshAABBTree3 |
spatial |
|
Double |
cellSize |
|
Fields
BufferCells
Declaration
Field Value
CancelF
if this function returns true, we should abort calculation
Declaration
public Func<bool> CancelF
Field Value
CellSize
Declaration
Field Value
ComputeMode
Declaration
public MeshWindingNumberGrid.ComputeModes ComputeMode
Field Value
DebugPrint
Declaration
Field Value
Mesh
Declaration
Field Value
MeshSpatial
Declaration
public DMeshAABBTree3 MeshSpatial
Field Value
Type |
Description |
DMeshAABBTree3 |
|
WantMeshSDFGrid
Declaration
public bool WantMeshSDFGrid
Field Value
WindingIsoValue
Declaration
public float WindingIsoValue
Field Value
Properties
Dimensions
Declaration
public Vector3i Dimensions { get; }
Property Value
Type |
Description |
Vector3i |
|
Grid
winding-number grid available after calling Compute()
Declaration
public DenseGrid3f Grid { get; }
Property Value
Type |
Description |
DenseGrid3f |
|
GridOrigin
Origin of the winding-number grid, in same coordinates as mesh
Declaration
public Vector3f GridOrigin { get; }
Property Value
Type |
Description |
Vector3f |
|
Item[Int32, Int32, Int32]
Declaration
public float this[int i, int j, int k] { get; }
Parameters
Property Value
SDFGrid
If ComputeMode==NarrowBand, then we internally compute a signed-distance grid,
which will hang onto
Declaration
public MeshSignedDistanceGrid SDFGrid { get; }
Property Value
Type |
Description |
MeshSignedDistanceGrid |
|
Methods
CellCenter(Int32, Int32, Int32)
Declaration
public Vector3f CellCenter(int i, int j, int k)
Parameters
Returns
Type |
Description |
Vector3f |
|
Compute()
Declaration