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

#include <FastWinding.h>

Public Member Functions

 TFastWindingTree (TMeshAABBTree3< TriangleMeshType > *TreeToRef, bool bAutoBuild=true)
 
void SetTree (TMeshAABBTree3< TriangleMeshType > *TreeToRef, bool bAutoBuild=true)
 
TMeshAABBTree3< TriangleMeshType > * GetTree () const
 
void Build (bool bForceRebuild=true)
 
bool IsBuilt () const
 
double FastWindingNumber (const FVector3d &P)
 
double FastWindingNumber (const FVector3d &P) const
 
bool IsInside (const FVector3d &P, double WindingIsoThreshold=0.5) const
 

Public Attributes

double FWNBeta = 2.0
 
int FWNApproxOrder = 2
 

Detailed Description

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

Fast Mesh Winding Number extension to a TMeshAABBTree3. This class is an "add-on" to the AABBTree, that can compute the Fast Mesh Winding Number. This calculation requires a precomputation pass where information is cached at each tree node.

Constructor & Destructor Documentation

◆ TFastWindingTree()

template<class TriangleMeshType >
UE::Geometry::TFastWindingTree< TriangleMeshType >::TFastWindingTree ( TMeshAABBTree3< TriangleMeshType > *  TreeToRef,
bool  bAutoBuild = true 
)
inline

Member Function Documentation

◆ Build()

template<class TriangleMeshType >
void UE::Geometry::TFastWindingTree< TriangleMeshType >::Build ( bool  bForceRebuild = true)
inline

◆ FastWindingNumber() [1/2]

template<class TriangleMeshType >
double UE::Geometry::TFastWindingTree< TriangleMeshType >::FastWindingNumber ( const FVector3d P)
inline

Fast approximation of winding number using far-field approximations. On a closed mesh the winding number will be 1 or more inside (depending on number of "winds"). Outside a closed mesh the winding number will be zero. On an open mesh, the above holds near the mesh but in the "hole" areas the value will smoothly blend from 1 to 0 over a band of width dependent on the hole extent

◆ FastWindingNumber() [2/2]

template<class TriangleMeshType >
double UE::Geometry::TFastWindingTree< TriangleMeshType >::FastWindingNumber ( const FVector3d P) const
inline

Const version does not auto-build on query

◆ GetTree()

◆ IsBuilt()

template<class TriangleMeshType >
bool UE::Geometry::TFastWindingTree< TriangleMeshType >::IsBuilt ( ) const
inline

◆ IsInside()

template<class TriangleMeshType >
bool UE::Geometry::TFastWindingTree< TriangleMeshType >::IsInside ( const FVector3d P,
double  WindingIsoThreshold = 0.5 
) const
inline
Returns
true if fast winding number at point P is greater than winding threshold (default 0.5)

◆ SetTree()

template<class TriangleMeshType >
void UE::Geometry::TFastWindingTree< TriangleMeshType >::SetTree ( TMeshAABBTree3< TriangleMeshType > *  TreeToRef,
bool  bAutoBuild = true 
)
inline

Member Data Documentation

◆ FWNApproxOrder

template<class TriangleMeshType >
int UE::Geometry::TFastWindingTree< TriangleMeshType >::FWNApproxOrder = 2

FWN approximation order. Must be 1 or 2. 2 is more accurate, obviously.

◆ FWNBeta

FWN beta parameter - is 2.0 in paper


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