Class MeshScalarSamplingGrid
Sample a scalar function on a discrete grid. Can sample full grid, or
compute values around 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
MeshScalarSamplingGrid
Namespace: gs
Assembly: cs.temp.dll.dll
Syntax
public class MeshScalarSamplingGrid
Constructors
MeshScalarSamplingGrid(DMesh3, Double, Func<Vector3d, Double>)
Declaration
public MeshScalarSamplingGrid(DMesh3 mesh, double cellSize, Func<Vector3d, double> scalarF)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Double |
cellSize |
|
Func<Vector3d, Double> |
scalarF |
|
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 MeshScalarSamplingGrid.ComputeModes ComputeMode
Field Value
DebugPrint
Declaration
Field Value
IsoValue
Declaration
Field Value
Mesh
Declaration
Field Value
ScalarF
Declaration
public Func<Vector3d, double> ScalarF
Field Value
WantMeshSDFGrid
Declaration
public bool WantMeshSDFGrid
Field Value
Properties
Dimensions
Declaration
public Vector3i Dimensions { get; }
Property Value
Type |
Description |
Vector3i |
|
Grid
scalar-values grid available after calling Compute()
Declaration
public DenseGrid3f Grid { get; }
Property Value
Type |
Description |
DenseGrid3f |
|
GridOrigin
Origin of the 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