GradientMapping

References
[IoId("00000000-5bfa-45cd-8428-84036d7b657c")] public readonly struct GradientMapping : IStorable
A numeric mapping into gradient domain parameters.

Constructors

GradientMapping

#
Create a new gradient domain mapping.
public GradientMapping(
g0,
Start of gradient.
g1,
End of gradient.
w0,
Start of world domain.
w1,
End of world domain.
auto0 = false,
Automatic world start.
auto1 = false
Automatic world end.
)

GradientMapping

#
Simple constructor.
public GradientMapping()

GradientMapping

#
public GradientMapping(
reader
)

Properties

AutoLower

#
Gets whether the WorldLower value ought to adjusted to fit a relevant data set. It is up to code dealing with gradients to perform this adjustment.
public bool AutoLower { get; }

AutoUpper

#
Gets whether the WorldLower value ought to adjusted to fit a relevant data set. It is up to code dealing with gradients to perform this adjustment.
public bool AutoUpper { get; }

GradientLower

#
Gets the leftmost parameter on the gradient domain.
public double GradientLower { get; }

GradientUpper

#
Gets the rightmost parameter on the gradient domain.
public double GradientUpper { get; }

HasAutomaticBounds

#
Gets whether this mapping has automatic lower or upper bounds.
public bool HasAutomaticBounds { get; }

IsIdentity

#
Gets whether this mapping represents an identity mapping.
public bool IsIdentity { get; }

WorldLower

#
Gets the world parameter where the gradient start is pinned.
public double WorldLower { get; }

WorldUpper

#
Gets the world parameter where the gradient end if pinned.
public double WorldUpper { get; }

Methods

AutoUpdate

#
Update this mapping to automatically stretch to the given limits.
public GradientMapping AutoUpdate(
minimum,
Lower world value.
maximum
Upper world value.
)

InverseMap

#
Unmap a gradient parameter.
public double InverseMap(double tʹ)
tʹ (double)

Map

#
Map a parameter into gradient domain.
public double Map()

ParseRange

#
Parse a gradient mapping notation.
public static Result<GradientMapping> ParseRange(
notation,
String containing 'from X to Y'.
intrinsicLower,
The fallback for the lower limit in case of automatic bounds.
intrinsicUpper
The fallback for the upper limit in case of automatic bounds.
)
Result. Note that the gradient lower and upper limits are not part of notation and as such have default values.

Store

#
public void Store(
writer
)
Store

ToString

#
public override string ToString()

WithAutomaticLimits

#
Sets the automatic world limits.
public GradientMapping WithAutomaticLimits(
autoLower,
autoUpper
)