-
首页
-
C4D R23.110 C++ SDK
C4DNoise Class Reference
Library
»
噪声
#include <lib_noise.h>
详细描述
The noise class used for the
Cinema 4D
shaders.
构造函数 & 析构函数文档编制
◆
C4DNoise()
◆
~C4DNoise()
成员函数文档编制
◆
Alloc()
Allocates a noise instance. Destroy the allocated noise instance with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in]
|
seed
|
The noise seed.
|
-
返回
-
The allocated noise instance, or
nullptr
if the allocation failed.
◆
Alloc2()
Allocates a noise instance. Destroy the allocated noise instance with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
注意
-
This uses a different seed than
Alloc()
for the internal noises so that they look exactly like the old noises.
-
参数
-
[in]
|
seed
|
The noise seed.
|
-
返回
-
The allocated noise instance, or
nullptr
if the allocation failed.
◆
Free()
Destructs noise instances allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
p
|
The noise instance to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
CreateMenuContainer()
Creates a menu container with the different noise options available.
-
参数
-
[in]
|
bIncludeNone
|
Pass
true
to include the None option.
|
-
返回
-
The generated noise menu. The NoiseType IDs are used.
◆
HasOctaves()
Checks if a certain noise type supports the octaves parameter.
-
参数
-
-
返回
-
true
if octaves is supported, otherwise
false
.
◆
HasAbsolute()
Checks if a certain noise type supports the absolute parameter.
-
参数
-
-
返回
-
true
if absolute is supported, otherwise
false
.
◆
HasCycles()
Checks if a certain noise type supports the cycles parameter.
-
参数
-
-
返回
-
true
if cycles is supported, otherwise
false
.
◆
EvaluateSampleOffset()
Evaluates the sample offset.
-
参数
-
[in]
|
type
|
The noise type:
NoiseType
|
[in]
|
rOctaves
|
The number of octaves.
|
[in]
|
rDelta
|
The delta.
|
[out]
|
rSampleOffset
|
Assigned the sample offset.
|
◆
GetNoisePreview()
Generates a noise preview in
dat
.
-
参数
-
[in]
|
t
|
The noise type:
NoiseType
|
[out]
|
dat
|
Filled with the noise preview.
|
[out]
|
str
|
If not
nullptr
then the name of the noise is assigned. The caller owns the pointed string.
|
◆
Noise()
Samples a 2D or 3D noise.
-
参数
-
[in]
|
t
|
The noise type:
NoiseType
|
[in]
|
two_d
|
true
for 2D sampling,
false
for 3D sampling.
|
[in]
|
p
|
The position.
|
[in]
|
time
|
The time.
|
[in]
|
octaves
|
The number of octaves.
|
[in]
|
absolute
|
true
to return an absolute value.
|
[in]
|
sampleRad
|
The sample radius.
|
[in]
|
detailAtt
|
The detail attenuation.
|
[in]
|
t_repeat
|
Must be
2^x - 1
,其中
x = [1..10]
, i.e. one of
1
,
3
,
7
,
15
,
31
,
63
,
127
,
255
,
511
,和
1023
.
A noise repeats itself in time every
1024
units. Using a smaller
t_repeat
the noise will repeat at an earlier time.
|
-
返回
-
The noise sample.
◆
InitFbm()
Initializes Fractal Brownian Motion.
-
参数
-
[in]
|
lMaxOctaves
|
The maximum number of octaves.
|
[in]
|
rLacunarity
|
The lacunarity.
|
[in]
|
h
|
The h parameter.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetFBMTable()
const
Float
* GetFBMTable
|
(
|
|
)
|
|
Private
.
◆
GetValueTable()
const
Float
* GetValueTable
|
(
|
|
)
|
|
Private
.
◆
GetImpulseTable()
const
Float
* GetImpulseTable
|
(
|
|
)
|
|
Private
.
◆
GetPermutationTable()
static const
UChar
* GetPermutationTable
|
(
|
|
)
|
|
|
static
|
Private
.
◆
GetTPPermutationTable()
const
Int32
* GetTPPermutationTable
|
(
|
|
)
|
|
Private
.
◆
GetNoiseGradient()
const NoiseGradient* GetNoiseGradient
|
(
|
|
)
|
|
Private
.
◆
GetPermutationTableA()
const
Int32
* GetPermutationTableA
|
(
|
|
)
|
|
Private
.
◆
SNoise()
[1/2]
Generates a signed noise value.
-
参数
-
[in]
|
p
|
The noise coordinate.
|
-
返回
-
A signed noise value, between
-1.0
and
1.0
.
◆
SNoise()
[2/2]
Generates a periodic signed noise value.
-
参数
-
[in]
|
p
|
The noise coordinate.
|
[in]
|
t
|
The time.
|
[in]
|
lRepeat
|
Must be
2^x - 1
,其中
x = [1..10]
, i.e. one of
1
,
3
,
7
,
15
,
31
,
63
,
127
,
255
,
511
,和
1023
.
A noise repeats itself in time every
1024
units. Using a smaller
lRepeat
the noise will repeat at an earlier time.
|
-
返回
-
A signed noise value, between
-1.0
and
1.0
.
◆
Turbulence()
Generates a periodic turbulence value, this is a sum of multiple noises with different frequency.
-
参数
-
[in]
|
p
|
The noise coordinate.
|
[in]
|
t
|
The time.
|
[in]
|
rOctaves
|
The number of octaves.
|
[in]
|
bAbsolute
|
true
to return an absolute value.
|
[in]
|
lRepeat
|
Must be
2^x - 1
,其中
x = [1..10]
, i.e. one of
1
,
3
,
7
,
15
,
31
,
63
,
127
,
255
,
511
,和
1023
.
A noise repeats itself in time every
1024
units. Using a smaller
lRepeat
the noise will repeat at an earlier time.
|
-
返回
-
A turbulence value, between
-1.0
and
1.0
unless
bAbsolute
is
true
, in which case it will be between
0.0
to
1.0
.
◆
Fbm()
Generates a periodic Fractional Brownian Motion value.
-
注意
-
Before using this function call
InitFbm()
.
-
参数
-
[in]
|
p
|
The noise coordinate.
|
[in]
|
t
|
The time.
|
[in]
|
rOctaves
|
The number of octaves. Must not exceed the value passed to
InitFbm()
, but can be lower.
|
[in]
|
lRepeat
|
Must be
2^x - 1
,其中
x = [1..10]
, i.e. one of
1
,
3
,
7
,
15
,
31
,
63
,
127
,
255
,
511
,和
1023
.
A noise repeats itself in time every
1024
units. Using a smaller
lRepeat
the noise will repeat at an earlier time.
|
-
返回
-
The Fbm value.
◆
RidgedMultifractal()
Generates a periodic fractal function used for such things as landscapes or mountain ranges.
-
注意
-
Before using this function call
InitFbm()
.
-
参数
-
[in]
|
p
|
The evaluation point.
|
[in]
|
t
|
The time.
|
[in]
|
rOctaves
|
The number of octaves. Must not exceed the value passed to
InitFbm()
, but can be lower.
|
[in]
|
rOffset
|
The zero offset, this controls the multifractality.
|
[in]
|
rGain
|
The amplification of the fractal value.
|
[in]
|
lRepeat
|
Must be
2^x - 1
,其中
x = [1..10]
, i.e. one of
1
,
3
,
7
,
15
,
31
,
63
,
127
,
255
,
511
,和
1023
.
A noise repeats itself in time every
1024
units. Using a smaller
lRepeat
the noise will repeat at an earlier time.
|
-
返回
-
The fractal value.