Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::HaltonSequence< Dimensions > Class Template Reference

#include <Random.h>

Public Member Functions

 HaltonSequence (AZStd::array< uint32_t, Dimensions > bases)
 
template<typename Iterator >
void FillHaltonSequence (Iterator begin, Iterator end)
 
template<uint32_t N>
AZStd::array< AZStd::array< float, Dimensions >, N > GetHaltonSequence ()
 Returns a Halton sequence in an array of N length.
 
void SetOffsets (AZStd::array< uint32_t, Dimensions > offsets)
 
void SetIncrements (AZStd::array< int32_t, Dimensions > increments)
 

Detailed Description

template<uint8_t Dimensions>
class AZ::HaltonSequence< Dimensions >

A helper class for generating arrays of Halton sequences in n dimensions. The class holds the state of which bases to use, the starting offset of each dimension and how much to increment between each index for each dimension.

Constructor & Destructor Documentation

◆ HaltonSequence()

template<uint8_t Dimensions>
AZ::HaltonSequence< Dimensions >::HaltonSequence ( AZStd::array< uint32_t, Dimensions >  bases)
inline

Initializes a Halton sequence with some bases. By default there is no offset and the index increments by 1 between each number.

Member Function Documentation

◆ FillHaltonSequence()

template<uint8_t Dimensions>
template<typename Iterator >
void AZ::HaltonSequence< Dimensions >::FillHaltonSequence ( Iterator  begin,
Iterator  end 
)
inline

Fills a provided container from begin to end with a Halton sequence. Entries are expected to be, or implicitly converted to, AZStd::array<float, Dimensions>.

◆ SetIncrements()

template<uint8_t Dimensions>
void AZ::HaltonSequence< Dimensions >::SetIncrements ( AZStd::array< int32_t, Dimensions >  increments)
inline

Sets the increment between numbers in the halton sequence per dimension By default this is 1, meaning that no numbers are skipped. Can be negative to generate numbers in reverse order.

◆ SetOffsets()

template<uint8_t Dimensions>
void AZ::HaltonSequence< Dimensions >::SetOffsets ( AZStd::array< uint32_t, Dimensions >  offsets)
inline

Sets the offsets per dimension to start generating a sequence from. By default, there is no offset (offset of 0 corresponds to starting at index 1).


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