namespace LibNoise.Generator
{
///
/// Provides a noise module that outputs a constant value. [GENERATOR]
///
public class Const : ModuleBase
{
#region Fields
private double _value;
#endregion
#region Constructors
///
/// Initializes a new instance of Const.
///
public Const()
: base(0)
{
}
///
/// Initializes a new instance of Const.
///
/// The constant value.
public Const(double value)
: base(0)
{
Value = value;
}
#endregion
#region Properties
///
/// Gets or sets the constant value.
///
public double Value
{
get { return _value; }
set { _value = value; }
}
#endregion
#region ModuleBase Members
///
/// Returns the output value for the given input coordinates.
///
/// The input coordinate on the x-axis.
/// The input coordinate on the y-axis.
/// The input coordinate on the z-axis.
/// The resulting output value.
public override double GetValue(double x, double y, double z)
{
return _value;
}
#endregion
}
}