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

#include <NormalHistogram.h>

Public Member Functions

 TNormalHistogram (int32 NumBins)
 
void Count (const TVector< RealType > &Normal, RealType Weight=1)
 
TVector< RealType > FindMaxNormal () const
 
RealType WeightedSpreadMetric () const
 

Public Attributes

int32 Bins
 
TSphericalFibonacci< RealType > BinPoints
 
TArray< RealType > WeightedCounts
 

Detailed Description

template<typename RealType>
class UE::Geometry::TNormalHistogram< RealType >

TNormalHistogram calculates/represents a histogram on a 3D sphere. The histogram bins are defined by a Spherical Fibonacci distribution, ie each bin is the voronoi cell of the Fibonacci point. This point set can be calculated for any N.

One current limitation of this implementation is that the unit +/- X/Y/Z axes are not bin center points.

Constructor & Destructor Documentation

◆ TNormalHistogram()

template<typename RealType >
UE::Geometry::TNormalHistogram< RealType >::TNormalHistogram ( int32  NumBins)
inline

Initialize a normal histogram with the given number of bins

Member Function Documentation

◆ Count()

template<typename RealType >
void UE::Geometry::TNormalHistogram< RealType >::Count ( const TVector< RealType > &  Normal,
RealType  Weight = 1 
)
inline

Count a Normal in the histogram, ie find the Bin it should be included in and add the Weight to that Bin (The Normal does not strictly need to be normalized)

Parameters
Weightoptional weight for this normal

◆ FindMaxNormal()

template<typename RealType >
TVector< RealType > UE::Geometry::TNormalHistogram< RealType >::FindMaxNormal ( ) const
inline
Returns
the normal direction for the Histogram bin that contains the most points / largest mass

◆ WeightedSpreadMetric()

template<typename RealType >
RealType UE::Geometry::TNormalHistogram< RealType >::WeightedSpreadMetric ( ) const
inline

Attempt to compute a measure of the range of variation in normals across the occupied bins

Member Data Documentation

◆ BinPoints

template<typename RealType >
TSphericalFibonacci<RealType> UE::Geometry::TNormalHistogram< RealType >::BinPoints

◆ Bins

template<typename RealType >
int32 UE::Geometry::TNormalHistogram< RealType >::Bins

◆ WeightedCounts

template<typename RealType >
TArray<RealType> UE::Geometry::TNormalHistogram< RealType >::WeightedCounts

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