Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Struct InitCellValueDataLayerArgs<TValue>

    Implements
    IInitCellValueDataLayerArgs<TValue>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Fwt.HexTerrains.Data
    Assembly: fwt.hexterrains.dll
    Syntax
    [Serializable]
    public struct InitCellValueDataLayerArgs<TValue> : IInitCellValueDataLayerArgs<TValue> where TValue : unmanaged
    Type Parameters
    Name Description
    TValue

    Properties

    DefaultValue

    When the layer is resized, this value is used to fill any new cells that are added to the layer. This allows for consistent initialization of new cells when the layer's dimensions change.

    Declaration
    public TValue DefaultValue { get; set; }
    Property Value
    Type Description
    TValue

    FillValue

    When the layer is initialized, this value is used to fill all cells in the layer. This provides a simple way to set a uniform initial value for all cells, which can be useful for creating flat terrain features or resetting cell values during initialization.

    Declaration
    public TValue FillValue { get; set; }
    Property Value
    Type Description
    TValue

    IsApplySourceTexture

    If true, the initialization process will apply values from a source texture to the cells. The source texture can be used to provide spatially varying initial values based on its pixel data, allowing for more complex and visually interesting terrain features SourceTextureValueOffset and SourceTextureValueScale.

    Declaration
    public bool IsApplySourceTexture { get; set; }
    Property Value
    Type Description
    bool

    IsFillWithRandomValues

    If true, the initialization process will fill cells with random values within the specified range defined by RandomMinValue and RandomMaxValue. This option allows for the creation of more varied and natural-looking terrain features by introducing randomness into the initial cell values.

    Declaration
    public bool IsFillWithRandomValues { get; set; }
    Property Value
    Type Description
    bool

    IsFillWithValue

    If true, the initialization process will fill cells with a constant value defined by FillValue. This option is useful for creating uniform terrain features or resetting cell values to a known state during initialization.

    Declaration
    public bool IsFillWithValue { get; set; }
    Property Value
    Type Description
    bool

    MaxValue

    Value representing the maximum expected value in the cell. Does not restrict the actual values that can be assigned to the cell, but serves as a reference for normalization or scaling purposes when processing cell values, such as calculating a color map.

    Declaration
    public TValue MaxValue { get; set; }
    Property Value
    Type Description
    TValue

    MinValue

    Value representing the minimum expected value in the cell. Does not restrict the actual values that can be assigned to the cell, but serves as a reference for normalization or scaling purposes when processing cell values, such as calculating a color map.

    Declaration
    public TValue MinValue { get; set; }
    Property Value
    Type Description
    TValue

    RandomMaxValue

    If IsFillWithRandomValues is true, this value represents the maximum value in the range from which random values will be generated to fill the cells. The actual random values assigned to the cells will be greater than or equal to RandomMinValue and less than or equal to this maximum value."/>

    Declaration
    public TValue RandomMaxValue { get; set; }
    Property Value
    Type Description
    TValue

    RandomMinValue

    If IsFillWithRandomValues is true, this value represents the minimum value in the range from which random values will be generated to fill the cells. The actual random values assigned to the cells will be greater than or equal to this minimum value and less than or equal to RandomMaxValue."/>

    Declaration
    public TValue RandomMinValue { get; set; }
    Property Value
    Type Description
    TValue

    SourceTexture

    If IsApplySourceTexture is true, this property holds the reference to the source texture used to initialize cell values. The pixel data from this texture can be sampled and processed to derive initial values for the cells, allowing for spatially varying initialization based on the texture's content. The specific mapping of texture pixels to cell values can be influenced by SourceTextureValueOffset and SourceTextureValueScale to achieve the desired range and distribution of initial cell values."/>

    Declaration
    public Texture2D SourceTexture { get; set; }
    Property Value
    Type Description
    Texture2D

    SourceTextureValueOffset

    If IsApplySourceTexture is true, this value is added to the sampled pixel values from the source texture before applying them to the cells. This allows for adjusting the baseline of the initial cell values derived from the texture, effectively shifting the range of values that can be assigned to the cells based on the texture's pixel data.

    Declaration
    public float SourceTextureValueOffset { get; set; }
    Property Value
    Type Description
    float

    SourceTextureValueScale

    If IsApplySourceTexture is true, this value is multiplied with the sampled pixel values from the source texture (after applying SourceTextureValueOffset) before applying them to the cells. This allows for scaling the range of initial cell values derived from the texture, effectively amplifying or reducing the influence of the texture's pixel data on the final cell values.

    Declaration
    public float SourceTextureValueScale { get; set; }
    Property Value
    Type Description
    float

    Implements

    IInitCellValueDataLayerArgs<TValue>

    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