Abstract base class for IVectorFunction implementations.
abstract class
|
VectorFunction
|
implements
|
IVectorFunction
|
||
extends
|
NoiseFunction<Vec3D>
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<IVectorFunction>
|
||
value
|
|
The configurator object. |
Returns the configuration value that describes this object.
public
abstract
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
inherited
|
NoiseFunction.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.
For
constant
noise
functions,
returns
the
constant
value.
For
all
others,
the
default
value
of
TValue
is
returned.
public
property
|
ConstantValue
{
get
}
|
||
type
|
TValue
|
||
value
|
The constant value. | ||
inherited
|
NoiseFunction.ConstantValue
|
A vector function that returns smooth gradient vectors.
public
static
readonly
field
|
Gradient
|
||
type
|
IVectorFunction
|
Does this noise function return a constant value?
public
virtual
property
|
IsConstant
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
noise
function
is
constant,
false
if
not. |
||
inherited
|
NoiseFunction.IsConstant
|
Remarks:
A constant noise function computes the same value for all input coordinates.
Returns the serial type of this object.
public
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
SerializableBase.SerialType
|
Returns the serial data version.
public
virtual
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
The serial data version tag. | |
inherited
|
SerializableBase.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]
|
||||
public
virtual
method
|
Add
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. | ||
implements
|
IVectorFunction.Add
|
Remarks:
result := this + function
Computes the noise value for the given input vector.
public
method
|
ComputeValue
(Vec3D v)
|
||
type
|
TValue
|
||
params
|
v
|
Coordinate of input vector. | |
returns
|
The noise value. | ||
inherited
|
NoiseFunction.ComputeValue
|
Computes the noise value for the given input vector.
public
abstract
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
|
NoiseFunction.ComputeValue
|
Returns a vector function that returns the given constant value.
public
static
method
|
Constant
(Vec3D value)
|
||
type
|
IVectorFunction
|
||
params
|
value
|
The constant value. | |
returns
|
|
The resulting noise function. |
Returns a vector function that returns the given constant value.
public
static
method
|
Constant
(float64 x,
float64 y,
float64 z)
|
||
type
|
IVectorFunction
|
||
params
|
x
|
X-component of constant value. | |
y
|
Y-component of constant value. | ||
z
|
Z-component of constant value. | ||
returns
|
|
The resulting noise function. |
Initializes the state of this object from the given data stream.
public
virtual
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
|
SerializableBase.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.SerializeCompares this object with the given one.
[Pure]
|
||||
public
abstract
method
|
Equals
(INoiseFunctionBase other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
inherited
|
NoiseFunction.Equals
|
Does this noise function have the given constant value?
public
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
|
NoiseFunction.HasConstantValue
|
Returns a vector function that applies a linear transformation on the input coordinates.
public
static
method
|
Input
(float64 scale,
Vec3D offset)
|
||
type
|
IVectorFunction
|
||
params
|
scale
|
Linear coefficient (see remarks). | |
offset
|
Linear coefficient (see remarks). | ||
returns
|
|
The resulting noise function. |
Remarks:
| x * s + offset.X | result := | y * s + offset.Y | | z * s + offset.Z |where
x
,
y
and
z
are
the
noise
input
coordinates.
Returns a vector function that applies a linear transformation on the input coordinates.
public
static
method
|
Input
(float64 scale = 1,
float64 offsetX = 0,
float64 offsetY = 0,
float64 offsetZ = 0)
|
||
type
|
IVectorFunction
|
||
params
|
scale
|
Linear coefficient (see remarks). | |
offsetX
|
Linear coefficient (see remarks). | ||
offsetY
|
Linear coefficient (see remarks). | ||
offsetZ
|
Linear coefficient (see remarks). | ||
returns
|
|
The resulting noise function. |
Remarks:
| x * s + offsetX | result := | y * s + offsetY | | z * s + offsetZ |where
x
,
y
and
z
are
the
noise
input
coordinates.
Applies a linear transformation on the output value of this noise function.
[Pure]
|
||||
public
method
|
Linear
(Vec3D scale,
Vec3D offset)
|
|||
type
|
IVectorFunction
|
|||
params
|
scale
|
Linear coefficient of output transform. | ||
offset
|
Linear coefficient of output transform. | |||
returns
|
|
The resulting noise function. | ||
implements
|
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]
|
||||
public
override
method
|
LinearBase
(Vec3D scale,
Vec3D offset)
|
|||
type
|
INoiseFunction<Vec3D>
|
|||
params
|
scale
|
Linear coefficient of output transform. | ||
offset
|
Linear coefficient of output transform. | |||
returns
|
|
The resulting noise function. | ||
implements
|
NoiseFunction.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]
|
||||
public
virtual
method
|
Mul
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. | ||
implements
|
IVectorFunction.Mul
|
Remarks:
result := this * factor
Normalizes the vector values of this noise function.
[Pure]
|
||||
public
virtual
method
|
Norm
()
|
|||
type
|
IVectorFunction
|
|||
returns
|
|
The resulting noise function. | ||
implements
|
IVectorFunction.Norm
|
Remarks:
result := this / |this|
Serializes the current state of this object to the given data stream.
public
virtual
method
|
Serialize
(ISerializer data)
|
||
params
|
data
|
[not-null]
|
The serial data stream. |
inherited
|
SerializableBase.Serialize
|
See also:
ISerializable.DeserializeSimplifies this noise function, if possible.
[Pure]
|
||||
public
method
|
Simplify
()
|
|||
type
|
IVectorFunction
|
|||
returns
|
|
The
simplified
noise
function
or
this . |
||
implements
|
INoiseFunctionOps.Simplify
|
Simplifies this noise function, if possible.
[Pure]
|
||||
public
virtual
method
|
SimplifyBase
()
|
|||
type
|
INoiseFunction<TValue>
|
|||
returns
|
|
The
simplified
noise
function
or
this . |
||
inherited
|
NoiseFunction.SimplifyBase
|
Subtracts the vector values of the given noise function from the vector values of this noise function.
[Pure]
|
||||
public
virtual
method
|
Sub
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The other noise function. | |
returns
|
|
The resulting noise function. | ||
implements
|
IVectorFunction.Sub
|
Remarks:
result := this - function
Transforms the input coordinates using the given vector function before plugging them into this noise function.
[Pure]
|
||||
public
virtual
method
|
Transform
(IVectorFunction function)
|
|||
type
|
IVectorFunction
|
|||
params
|
function
|
[not-null]
|
The vector function to use for transforming the input coordinates. | |
returns
|
|
The resulting noise function. | ||
implements
|
INoiseFunctionOps.Transform
|
protected
constructor
|
VectorFunction
(ISerialTypeInfo serialType)
|
||
params
|
serialType
|
protected
override
sealed
method
|
EqualValue
(Vec3D a,
Vec3D b)
|
||
type
|
bool
|
||
params
|
a
|
||
b
|
|||
implements
|
NoiseFunction.EqualValue
|
protected
method
|
SimplifyAdd
(INoiseFunction<TValue> a,
INoiseFunction<TValue> b)
|
||
type
|
INoiseFunction<TValue>
|
||
params
|
a
|
||
b
|
|||
inherited
|
NoiseFunction.SimplifyAdd
|
protected
method
|
SimplifyMul
(INoiseFunction<TValue> a,
INoiseFunction<TValue> b)
|
||
type
|
INoiseFunction<TValue>
|
||
params
|
a
|
||
b
|
|||
inherited
|
NoiseFunction.SimplifyMul
|
protected
method
|
SimplifySub
(INoiseFunction<TValue> a,
INoiseFunction<TValue> b)
|
||
type
|
INoiseFunction<TValue>
|
||
params
|
a
|
||
b
|
|||
inherited
|
NoiseFunction.SimplifySub
|
Negates
the
given
noise
value,
so
that
value
+
(-value)
=
0
.
protected
override
sealed
method
|
ValueNeg
(Vec3D value)
|
||
type
|
Vec3D
|
||
params
|
value
|
The noise value. | |
returns
|
The resulting noise value. | ||
overrides
|
NoiseFunction.ValueNeg
|