Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Struct ExponentialCurve

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Fwt.HexTerrains.GeoPlasts.Data
    Assembly: fwt.hexterrains.dll
    Syntax
    [Serializable]
    [BurstCompile]
    public struct ExponentialCurve

    Fields

    CurveFactor

    Declaration
    [Tooltip("Curve factor. 1 means linear, more than 1 - Convex curve, Between 0 and 1 - Concave curvee")]
    public float CurveFactor
    Field Value
    Type Description
    float

    IsInverted

    Declaration
    [Tooltip("If true, the output value will be inverted (1 - value) after curve calculation and before applying scale and offset")]
    public bool IsInverted
    Field Value
    Type Description
    bool

    MaxValue

    Declaration
    [Tooltip("Maximum value for the curve calculation. When input value is equals or more than this, the output is one")]
    public float MaxValue
    Field Value
    Type Description
    float

    MinValue

    Declaration
    [Tooltip("Minimum value for the curve calculation. When input value is below or equals this, the output is zero")]
    public float MinValue
    Field Value
    Type Description
    float

    OutputValueOffset

    Declaration
    [Tooltip("Offset added to the output value after curve calculation")]
    public float OutputValueOffset
    Field Value
    Type Description
    float

    OutputValueScale

    Declaration
    [Tooltip("Scale applied to the output value after curve calculation and adding offset")]
    public float OutputValueScale
    Field Value
    Type Description
    float

    Properties

    Default

    Declaration
    public static ExponentialCurve Default { get; }
    Property Value
    Type Description
    ExponentialCurve

    Methods

    CalculateCurve(float, float, float, float, out float)

    Declaration
    [BurstCompile]
    public static void CalculateCurve(float value, float minValue, float maxValue, float curveFactor, out float result)
    Parameters
    Type Name Description
    float value
    float minValue
    float maxValue
    float curveFactor
    float result

    CurvePow(float, float, out float)

    Applies logical curve: progress^curveFactor

    Declaration
    [BurstCompile]
    public static void CurvePow(float progress, float curveFactor, out float result)
    Parameters
    Type Name Description
    float progress

    Progress along the curve (x axis)

    float curveFactor

    1 means straight line from 0 to 1 with progress. More than 1 - Convex curve, Between 0 and 1 - Concave curve, negative - inversed curve

    float result

    Evaluate(float)

    Calculates curved value for the given input value.

    Declaration
    [BurstCompile]
    public float Evaluate(float inputValue)
    Parameters
    Type Name Description
    float inputValue
    Returns
    Type Description
    float

    Evaluate(float, out float)

    Calculates curved value for the given input value.

    Declaration
    [BurstCompile]
    public void Evaluate(float inputValue, out float result)
    Parameters
    Type Name Description
    float inputValue
    float result

    Normalize01(float, float, float, out float)

    Normalizes value between min and max to 0-1 range. Values below min return 0, values above max return 1.

    Declaration
    [BurstCompile]
    public static void Normalize01(float value, float minValue, float maxValue, out float result)
    Parameters
    Type Name Description
    float value

    value to normalize between min and max to 0-1 range.

    float minValue

    if value is below or equals to this, the result is 0

    float maxValue

    if value is above or equals to this, the result is 1

    float result

    Extension Methods

    HashExtensions.GetHashCode_ValueType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX