Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Spatial
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/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
| Type | Name | Description | |
|---|---|---|---|
| int | BufferCells | How many cells around border should we keep | |
| bool | bWantMeshSDFGrid | In NarrowBand mode, we compute mesh SDF grid; if true then it can be accessed via SDFGrid function after Compute() | |
| TFunction< bool()> | CancelF | If this function returns true, we should abort calculation | |
| double | CellSize | Size of cubes in the grid | |
| EComputeModes | ComputeMode | ||
| TFastWindingTree< TriangleMeshType > * | FastWinding | ||
| FVector3f | GridOrigin | Computed results | |
| const TriangleMeshType * | Mesh | ||
| TSweepingMeshSDF< TriangleMeshType > | MeshSDF | SDF grid we compute in narrow-band mode. | |
| FDenseGrid3f | WindingGrid | ||
| float | WindingIsoValue | In narrow-band mode, if mesh is not closed, we will explore space around this MWN iso-value |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TMeshWindingNumberGrid
(
const TriangleMeshType* Mesh, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| constexpr const float & | At
(
int I, |
||
| FVector3f | CellCenter
(
int I, |
||
| void | Compute () |
||
| FVector3i | Dimensions () |
||
| float |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EComputeModes | Should we compute MWN at all grid cells (expensive!!) or only in narrow band. |