Class HeightmapUtils
- Namespace
- Stride.Physics
- Assembly
- Stride.Physics.dll
public class HeightmapUtils
- Inheritance
-
HeightmapUtils
Methods
CheckHeightParameters(Int2, HeightfieldTypes, Vector2, float, bool)
public static bool CheckHeightParameters(Int2 size, HeightfieldTypes heightType, Vector2 heightRange, float heightScale, bool throwExceptionWhenInvalid)
Parameters
size Int2
heightType HeightfieldTypes
heightRange Vector2
heightScale float
throwExceptionWhenInvalid bool
Returns
- bool
ConvertToByteHeight(float, float, float)
public static byte ConvertToByteHeight(float minValue, float maxValue, float value)
Parameters
minValue float
maxValue float
value float
Returns
- byte
ConvertToByteHeights(short[], short, short)
public static byte[] ConvertToByteHeights(short[] values, short minValue = -32768, short maxValue = 32767)
Parameters
values short[]
minValue short
maxValue short
Returns
- byte[]
ConvertToByteHeights(float[], float, float)
public static byte[] ConvertToByteHeights(float[] values, float minValue, float maxValue)
Parameters
values float[]
minValue float
maxValue float
Returns
- byte[]
ConvertToFloatHeight(float, float, float)
public static float ConvertToFloatHeight(float minValue, float maxValue, float value)
Parameters
minValue float
maxValue float
value float
Returns
- float
ConvertToFloatHeights(byte[], byte, byte)
public static float[] ConvertToFloatHeights(byte[] values, byte minValue = 0, byte maxValue = 255)
Parameters
values byte[]
minValue byte
maxValue byte
Returns
- float[]
ConvertToFloatHeights(short[], short, short)
public static float[] ConvertToFloatHeights(short[] values, short minValue = -32768, short maxValue = 32767)
Parameters
values short[]
minValue short
maxValue short
Returns
- float[]
ConvertToFloatHeights(float[], float, float)
public static float[] ConvertToFloatHeights(float[] values, float minValue, float maxValue)
Parameters
values float[]
minValue float
maxValue float
Returns
- float[]
ConvertToShortHeight(float, float, float)
public static short ConvertToShortHeight(float minValue, float maxValue, float value)
Parameters
minValue float
maxValue float
value float
Returns
- short
ConvertToShortHeights(byte[], byte, byte)
public static short[] ConvertToShortHeights(byte[] values, byte minValue = 0, byte maxValue = 255)
Parameters
values byte[]
minValue byte
maxValue byte
Returns
- short[]
ConvertToShortHeights(short[], short, short)
public static short[] ConvertToShortHeights(short[] values, short minValue = -32768, short maxValue = 32767)
Parameters
values short[]
minValue short
maxValue short
Returns
- short[]
ConvertToShortHeights(float[], float, float)
public static short[] ConvertToShortHeights(float[] values, float minValue, float maxValue)
Parameters
values float[]
minValue float
maxValue float
Returns
- short[]
Resize<T>(T[], Int2, Int2)
public static T[] Resize<T>(T[] pixels, Int2 originalSize, Int2 newSize)
Parameters
pixels T[]
originalSize Int2
newSize Int2
Returns
- T[]
Type Parameters
T