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