UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType > Class Template Reference

#include <MeshWindingNumberGrid.h>

Public Types

enum  EComputeModes { FullGrid = 0 , NarrowBand = 1 }
 

Public Member Functions

 TMeshWindingNumberGrid (const TriangleMeshType *Mesh, TFastWindingTree< TriangleMeshType > *FastWinding, double CellSize)
 
void Compute ()
 
FVector3i Dimensions () const
 
constexpr const floatAt (int I, int J, int K) const
 
float GetValue (const FVector3i &IJK) const
 
FVector3f CellCenter (int I, int J, int K)
 

Public Attributes

const TriangleMeshTypeMesh
 
TFastWindingTree< TriangleMeshType > * FastWinding
 
double CellSize
 
int BufferCells = 1
 
EComputeModes ComputeMode = EComputeModes::NarrowBand
 
float WindingIsoValue = 0.5f
 
bool bWantMeshSDFGrid = true
 
TFunction< bool()> CancelF = [](){ return false; }
 
FVector3f GridOrigin
 
FDenseGrid3f WindingGrid
 
TSweepingMeshSDF< TriangleMeshTypeMeshSDF
 

Detailed Description

template<class TriangleMeshType>
class UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >

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?

Member Enumeration Documentation

◆ EComputeModes

Enumerator
FullGrid 
NarrowBand 

Constructor & Destructor Documentation

◆ TMeshWindingNumberGrid()

template<class TriangleMeshType >
UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::TMeshWindingNumberGrid ( const TriangleMeshType Mesh,
TFastWindingTree< TriangleMeshType > *  FastWinding,
double  CellSize 
)
inline

Member Function Documentation

◆ At()

template<class TriangleMeshType >
constexpr const float & UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::At ( int  I,
int  J,
int  K 
) const
inlineconstexpr

◆ CellCenter()

template<class TriangleMeshType >
FVector3f UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::CellCenter ( int  I,
int  J,
int  K 
)
inline

◆ Compute()

◆ Dimensions()

template<class TriangleMeshType >
FVector3i UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::Dimensions ( ) const
inline

◆ GetValue()

template<class TriangleMeshType >
float UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::GetValue ( const FVector3i IJK) const
inline

Member Data Documentation

◆ BufferCells

◆ bWantMeshSDFGrid

◆ CancelF

if this function returns true, we should abort calculation

◆ CellSize

◆ ComputeMode

◆ FastWinding

◆ GridOrigin

◆ Mesh

◆ MeshSDF

◆ WindingGrid

◆ WindingIsoValue

template<class TriangleMeshType >
float UE::Geometry::TMeshWindingNumberGrid< TriangleMeshType >::WindingIsoValue = 0.5f

The documentation for this class was generated from the following file: