Navigation
API > API/Runtime > API/Runtime/GeometryCore
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.
| Name | TNormalHistogram |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Sampling/NormalHistogram.h |
| Include Path | #include "Sampling/NormalHistogram.h" |
Syntax
template<typename RealType>
class TNormalHistogram
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TNormalHistogram
(
int32 NumBins |
Initialize a normal histogram with the given number of bins | Sampling/NormalHistogram.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BinPoints | TSphericalFibonacci< RealType > | Sampling/NormalHistogram.h | ||
| Bins | int32 | Sampling/NormalHistogram.h | ||
| WeightedCounts | TArray< RealType > | Sampling/NormalHistogram.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Count
(
const TVector< RealType >& Normal, |
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) | Sampling/NormalHistogram.h | |
TVector< RealType > FindMaxNormal() |
Sampling/NormalHistogram.h | ||
RealType WeightedSpreadMetric() |
Attempt to compute a measure of the range of variation in normals across the occupied bins | Sampling/NormalHistogram.h |