Base interface for classes that compute procedural vector noise values.
interface
|
IVectorFunction
|
extends
|
INoiseFunctionOps<Vec3D, IVectorFunction>
|
||
base of
|
VectorFunction
|
For
constant
noise
functions,
returns
the
constant
value.
For
all
others,
the
default
value
of
TValue
is
returned.
property
|
ConstantValue
{
get
}
|
||
type
|
TValue
|
||
value
|
The constant value. | ||
inherited
|
INoiseFunction.ConstantValue
|
Does this noise function return a constant value?
property
|
IsConstant
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
noise
function
is
constant,
false
if
not. |
||
inherited
|
INoiseFunctionBase.IsConstant
|
Remarks:
A constant noise function computes the same value for all input coordinates.
Returns the serial type of this object.
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
ISerializable.SerialType
|
Returns the serial data version.
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
The serial data version tag. | |
inherited
|
ISerializable.SerialVersion
|
Remarks:
An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.
See also:
ISerializable.SerializeAdds the vector values of this noise function and the given noise function.
[Pure]
|
||||
method
|
Add
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. |
Remarks:
result := this + function
Computes the noise value for the given input vector.
method
|
ComputeValue
(Vec3D v)
|
||
type
|
TValue
|
||
params
|
v
|
Coordinate of input vector. | |
returns
|
The noise value. | ||
inherited
|
INoiseFunction.ComputeValue
|
Computes the noise value for the given input vector.
method
|
ComputeValue
(float64 x,
float64 y,
float64 z)
|
||
type
|
TValue
|
||
params
|
x
|
X-coordinate of input vector. | |
y
|
Y-coordinate of input vector. | ||
z
|
Z-coordinate of input vector. | ||
returns
|
The noise value. | ||
inherited
|
INoiseFunction.ComputeValue
|
Initializes the state of this object from the given data stream.
method
|
Deserialize
(int32 serialVersion,
ISerializer data)
|
||
type
|
ISerializable
|
||
params
|
serialVersion
|
[>=1]
|
The serial data version. |
data
|
[not-null]
|
The serial data stream. | |
returns
|
|
The
deserialized
object.
This
will
typically
be
this ,
but
in
some
circumstances,
another
instance
may
be
returned
(e.g.
singletons).
|
|
inherited
|
ISerializable.Deserialize
|
Remarks:
The Deserialize method will be called immediately after the object has been instantiated via its default constructor.
The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).
See also:
ISerializable.SerializeDoes this noise function have the given constant value?
method
|
HasConstantValue
(TValue value)
|
||
type
|
bool
|
||
params
|
value
|
The constant value. | |
returns
|
true
if
this
noise
function
has
the
given
constant
value,
false
if
not.
|
||
inherited
|
INoiseFunction.HasConstantValue
|
Applies a linear transformation on the output value of this noise function.
[Pure]
|
||||
method
|
Linear
(TValue scale,
TValue offset)
|
|||
type
|
TNoise
|
|||
params
|
scale
|
Linear coefficient of output transform. | ||
offset
|
Linear coefficient of output transform. | |||
returns
|
|
The resulting noise function. | ||
inherited
|
INoiseFunctionOps.Linear
|
Remarks:
result = noise * scale + offsetwhere
noise
is
this
noise
function
and
result
is
the
returned
noise
function.
Applies a linear transformation on the output value of this noise function.
[Pure]
|
||||
method
|
LinearBase
(TValue scale,
TValue offset)
|
|||
type
|
INoiseFunction<TValue>
|
|||
params
|
scale
|
Linear coefficient of output transform. | ||
offset
|
Linear coefficient of output transform. | |||
returns
|
|
The resulting noise function. | ||
inherited
|
INoiseFunction.LinearBase
|
Remarks:
result = noise * scale + offsetwhere
noise
is
this
noise
function
and
result
is
the
returned
noise
function.
Multiplies the vector values of this noise function with the vector values of the the given noise function.
[Pure]
|
||||
method
|
Mul
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. |
Remarks:
result := this * factor
Normalizes the vector values of this noise function.
[Pure]
|
||||
method
|
Norm
()
|
|||
type
|
IVectorFunction
|
|||
returns
|
|
The resulting noise function. |
Remarks:
result := this / |this|
Serializes the current state of this object to the given data stream.
method
|
Serialize
(ISerializer data)
|
||
params
|
data
|
[not-null]
|
The serial data stream. |
inherited
|
ISerializable.Serialize
|
See also:
ISerializable.DeserializeSimplifies this noise function, if possible.
[Pure]
|
||||
method
|
Simplify
()
|
|||
type
|
TNoise
|
|||
returns
|
|
The
simplified
noise
function
or
this . |
||
inherited
|
INoiseFunctionOps.Simplify
|
Simplifies this noise function, if possible.
[Pure]
|
||||
method
|
SimplifyBase
()
|
|||
type
|
INoiseFunction<TValue>
|
|||
returns
|
|
The
simplified
noise
function
or
this . |
||
inherited
|
INoiseFunction.SimplifyBase
|
Subtracts the vector values of the given noise function from the vector values of this noise function.
[Pure]
|
||||
method
|
Sub
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. |
Remarks:
result := this - function
Returns the configuration value that describes this object.
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
inherited
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Transforms the input coordinates using the given vector function before plugging them into this noise function.
[Pure]
|
||||
method
|
Transform
(IVectorFunction function)
|
|||
type
|
TNoise
|
|||
params
|
function
|
[not-null]
|
The vector function to use for transforming the input coordinates. | |
returns
|
|
The resulting noise function. | ||
inherited
|
INoiseFunctionOps.Transform
|
Adds the vector values of this noise function and the given vector value.
[Pure]
|
||||
method
|
AddV
(Vec3D value)
|
|||
type
|
IVectorFunction
|
|||
params
|
value
|
The value to add. | ||
returns
|
|
The resulting noise function. |
Remarks:
result := this + value
Returns a multifractal noise function based on this noise function.
[Pure]
|
||||
method
|
MultiSum
(int32 octaves,
float64 amplitude = 0.5,
float64 frequency = 2)
|
|||
type
|
IVectorFunction
|
|||
params
|
octaves
|
[>=1]
|
The number of octaves. | |
amplitude
|
Factor
to
apply
to
amplitude
when
going
to
the
next
octave.
The
amplitude
of
the
first
octave
is
1 .
|
|||
frequency
|
Factor
to
apply
to
frequency
when
going
to
the
next
octave.
The
frequency
of
the
first
octave
is
1 .
|
|||
returns
|
|
The resulting noise function. |
Multiplies the vector values of this noise function with the given scalar value.
[Pure]
|
||||
method
|
MulV
(Vec3D value)
|
|||
type
|
IVectorFunction
|
|||
params
|
value
|
The value to multiply with. | ||
returns
|
|
The resulting noise function. |
Remarks:
result := this * value
Applies the given function operator to this noise function and the given one (for binary operators only).
method
|
Op
(VectorFunctionOpCode op,
IVectorFunction other = null)
|
||
type
|
IVectorFunction
|
||
params
|
op
|
The operation to use. | |
other
|
The
other
noise
function
or
null
if
op
is
unary.
|
||
returns
|
|
The resulting noise function. |
Applies the given function operator to this noise function and the given vector value (for binary operators only).
method
|
OpV
(VectorFunctionOpCode op,
Vec3D value)
|
||
type
|
IVectorFunction
|
||
params
|
op
|
The operation to use. | |
value
|
The vector value to combine with. | ||
returns
|
|
The resulting noise function. |
Subtracts the given vector value from the vector values of this noise function.
[Pure]
|
||||
method
|
SubV
(Vec3D value)
|
|||
type
|
IVectorFunction
|
|||
params
|
value
|
The value to subtract. | ||
returns
|
|
The resulting noise function. |
Remarks:
result := this - value