Stratified2DRandom Class Reference

#include <c4d_tools.h>

详细描述

A class to generate stratified 2D random numbers.

公共成员函数

Bool   Init ( Int32 initial_value, Bool reset)
void  GetNext ( Float *xx, Float *yy)

静态公共成员函数

static Stratified2DRandom Alloc (void)
static void  Free ( Stratified2DRandom *&rnd)

私有成员函数

  Stratified2DRandom ()
  ~Stratified2DRandom ()

构造函数 & 析构函数文档编制

◆  Stratified2DRandom()

Stratified2DRandom () private

◆  ~Stratified2DRandom()

~ Stratified2DRandom () private

成员函数文档编制

◆  Alloc()

static Stratified2DRandom * Alloc ( void  )
static

Allocates a generator. Destroy the allocated generator with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated generator, or nullptr if the allocation failed.

◆  Free()

static void Free ( Stratified2DRandom *&  rnd )
static

Destructs generators allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in,out] rnd The generator to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  Init()

Bool Init ( Int32   initial_value ,
Bool   reset  
)

Initializes the generator.

参数
[in] initial_value Initial value.
[in] reset true if the generator should be reset, otherwise false .
返回
true if successful, otherwise false .

◆  GetNext()

void GetNext ( Float xx ,
Float yy  
)

Gets the next random value pair.

参数
[in] xx Assigned the first random value.
[in] yy Assigned the second random value.