UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
HaltonUtilities.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 HaltonUtilities.h: Class definition for optimized evaluation of Halton
5 sequences.
6=============================================================================*/
7
8#pragma once
9
10// Copyright (c) 2012 Leonhard Gruenschloss (leonhard@gruenschloss.org)
11//
12// Permission is hereby granted, free of charge, to any person obtaining a copy
13// of this software and associated documentation files (the "Software"), to deal
14// in the Software without restriction, including without limitation the rights to
15// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
16// of the Software, and to permit persons to whom the Software is furnished to do
17// so, subject to the following conditions:
18//
19// The above copyright notice and this permission notice shall be included in
20// all copies or substantial portions of the Software.
21//
22// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28// SOFTWARE.
29
30// This file has been adapted to UE
31
32#include "Containers/Array.h"
33
41{
42public:
44
45 static uint32 GetNumberOfDimensions() { return 64; }
46
47 float Sample(int Dimension, unsigned int Index) const;
48
49 const TArray<int>& GetFaurePermutations() const { return FaurePermutations; }
50 const TArray<int>& GetFaurePermutationOffsets() const { return FaurePermutationOffsets; }
51
52private:
53 int Invert(int Base, int Digits, int Index, const TArray<int>& Permutation);
54 void InitTables(const TArray<TArray<int>>& Permutations);
55 void BuildPermutation(int Size, int Base, int Digits, const TArray<TArray<int>>& Permutations);
56 void FlattenPermutation(const TArray<int>& PermutationLocal);
57
58 TArray<int> FaurePermutations;
59 TArray<int> FaurePermutationOffsets;
60};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition HaltonUtilities.h:41
const TArray< int > & GetFaurePermutations() const
Definition HaltonUtilities.h:49
FHaltonSequence()
Definition HaltonUtilities.cpp:123
static uint32 GetNumberOfDimensions()
Definition HaltonUtilities.h:45
float Sample(int Dimension, unsigned int Index) const
Definition HaltonUtilities.cpp:51
const TArray< int > & GetFaurePermutationOffsets() const
Definition HaltonUtilities.h:50
Definition Array.h:670
U16 Index
Definition radfft.cpp:71