TMeshWindingNumberGrid

Sample mesh winding number (MWN) on a discrete grid.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Spatial/MeshWindingNumberGrid.h

Include

#include "Spatial/MeshWindingNumberGrid.h"

Syntax

template<class TriangleMeshType>
class TMeshWindingNumberGrid

Remarks

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?

Variables

Name Description

Public variable

int

 

BufferCells

How many cells around border should we keep

Public variable

bool

 

bWantMeshSDFGrid

In NarrowBand mode, we compute mesh SDF grid; if true then it can be accessed via SDFGrid function after Compute()

Public variable

TFunction< bool...

 

CancelF

If this function returns true, we should abort calculation

Public variable

double

 

CellSize

Size of cubes in the grid

Public variable

EComputeModes

 

ComputeMode

Public variable

TFastWindingTre...

 

FastWinding

Public variable

FVector3f

 

GridOrigin

Computed results

Public variable

const TriangleM...

 

Mesh

Public variable

TSweepingMeshSD...

 

MeshSDF

SDF grid we compute in narrow-band mode.

Public variable

FDenseGrid3f

 

WindingGrid

Public variable

float

 

WindingIsoValue

In narrow-band mode, if mesh is not closed, we will explore space around this MWN iso-value

Constructors

Name Description

Public function

TMeshWindingNumberGrid

(
    const TriangleMeshType* Mesh,
    TFastWindingTree< TriangleMeshType ...,
    double CellSize
)

Functions

Name Description

Public function Const

constexpr co...

 

At

(
    int I,
    int J,
    int K
)

Public function

FVector3f

 

CellCenter

(
    int I,
    int J,
    int K
)

Public function

void

 

Compute()

Public function Const

FVector3i

 

Dimensions()

Public function Const

float

 

GetValue

(
    const FVector3i& IJK
)

Enums

Name

Description

Public enum

EComputeModes

Should we compute MWN at all grid cells (expensive!!) or only in narrow band.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss