Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    HeightmapUtils Class

    Namespace: Stride.Physics
    Assembly: Stride.Physics.dll
    System.Object → HeightmapUtils
    Derived from HeightmapUtils:

    public class HeightmapUtils
    Name Description
    Methods
    CheckHeightParameters(Int2, HeightfieldTypes, Vector2, Single, Boolean)
    ConvertToByteHeight(Single, Single, Single)
    ConvertToByteHeights(Int16[], Int16, Int16)
    ConvertToByteHeights(Single[], Single, Single)
    ConvertToFloatHeight(Single, Single, Single)
    ConvertToFloatHeights(Byte[], Byte, Byte)
    ConvertToFloatHeights(Int16[], Int16, Int16)
    ConvertToFloatHeights(Single[], Single, Single)
    ConvertToShortHeight(Single, Single, Single)
    ConvertToShortHeights(Byte[], Byte, Byte)
    ConvertToShortHeights(Int16[], Int16, Int16)
    ConvertToShortHeights(Single[], Single, Single)
    Resize<T>(T[], Int2, Int2)
    | Improve this Doc View Source

    Methods


    CheckHeightParameters(Int2, HeightfieldTypes, Vector2, Single, Boolean)

    public static bool CheckHeightParameters(Int2 size, HeightfieldTypes heightType, Vector2 heightRange, float heightScale, bool throwExceptionWhenInvalid)
    Parameters
    Type Name Description
    Int2 size
    HeightfieldTypes heightType
    Vector2 heightRange
    System.Single heightScale
    System.Boolean throwExceptionWhenInvalid
    Returns
    Type Description
    System.Boolean

    ConvertToByteHeight(Single, Single, Single)

    public static byte ConvertToByteHeight(float minValue, float maxValue, float value)
    Parameters
    Type Name Description
    System.Single minValue
    System.Single maxValue
    System.Single value
    Returns
    Type Description
    System.Byte

    ConvertToByteHeights(Int16[], Int16, Int16)

    public static byte[] ConvertToByteHeights(short[] values, short minValue = -32768, short maxValue = 32767)
    Parameters
    Type Name Description
    System.Int16[] values
    System.Int16 minValue
    System.Int16 maxValue
    Returns
    Type Description
    System.Byte[]

    ConvertToByteHeights(Single[], Single, Single)

    public static byte[] ConvertToByteHeights(float[] values, float minValue, float maxValue)
    Parameters
    Type Name Description
    System.Single[] values
    System.Single minValue
    System.Single maxValue
    Returns
    Type Description
    System.Byte[]

    ConvertToFloatHeight(Single, Single, Single)

    public static float ConvertToFloatHeight(float minValue, float maxValue, float value)
    Parameters
    Type Name Description
    System.Single minValue
    System.Single maxValue
    System.Single value
    Returns
    Type Description
    System.Single

    ConvertToFloatHeights(Byte[], Byte, Byte)

    public static float[] ConvertToFloatHeights(byte[] values, byte minValue = 0, byte maxValue = 255)
    Parameters
    Type Name Description
    System.Byte[] values
    System.Byte minValue
    System.Byte maxValue
    Returns
    Type Description
    System.Single[]

    ConvertToFloatHeights(Int16[], Int16, Int16)

    public static float[] ConvertToFloatHeights(short[] values, short minValue = -32768, short maxValue = 32767)
    Parameters
    Type Name Description
    System.Int16[] values
    System.Int16 minValue
    System.Int16 maxValue
    Returns
    Type Description
    System.Single[]

    ConvertToFloatHeights(Single[], Single, Single)

    public static float[] ConvertToFloatHeights(float[] values, float minValue, float maxValue)
    Parameters
    Type Name Description
    System.Single[] values
    System.Single minValue
    System.Single maxValue
    Returns
    Type Description
    System.Single[]

    ConvertToShortHeight(Single, Single, Single)

    public static short ConvertToShortHeight(float minValue, float maxValue, float value)
    Parameters
    Type Name Description
    System.Single minValue
    System.Single maxValue
    System.Single value
    Returns
    Type Description
    System.Int16

    ConvertToShortHeights(Byte[], Byte, Byte)

    public static short[] ConvertToShortHeights(byte[] values, byte minValue = 0, byte maxValue = 255)
    Parameters
    Type Name Description
    System.Byte[] values
    System.Byte minValue
    System.Byte maxValue
    Returns
    Type Description
    System.Int16[]

    ConvertToShortHeights(Int16[], Int16, Int16)

    public static short[] ConvertToShortHeights(short[] values, short minValue = -32768, short maxValue = 32767)
    Parameters
    Type Name Description
    System.Int16[] values
    System.Int16 minValue
    System.Int16 maxValue
    Returns
    Type Description
    System.Int16[]

    ConvertToShortHeights(Single[], Single, Single)

    public static short[] ConvertToShortHeights(float[] values, float minValue, float maxValue)
    Parameters
    Type Name Description
    System.Single[] values
    System.Single minValue
    System.Single maxValue
    Returns
    Type Description
    System.Int16[]

    Resize<T>(T[], Int2, Int2)

    public static T[] Resize<T>(T[] pixels, Int2 originalSize, Int2 newSize)
    Parameters
    Type Name Description
    T[] pixels
    Int2 originalSize
    Int2 newSize
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation