Struct HeightmapCompression
- Namespace
- Trailblazer.Heightmaps
- Assembly
- Trailblazer.dll
Describes deterministic quantization for compact heightmap samples.
public readonly struct HeightmapCompression
- Inherited Members
Constructors
HeightmapCompression(Fixed64, Fixed64)
Creates compression metadata for short-backed height samples.
public HeightmapCompression(Fixed64 referenceHeight, Fixed64 heightStep)
Parameters
referenceHeightFixed64Ground height represented by compressed value zero.
heightStepFixed64Positive world-height delta represented by one compressed unit.
Exceptions
- ArgumentOutOfRangeException
Thrown when
heightStepis not positive.
Properties
HeightStep
World-height delta represented by one compressed unit.
public Fixed64 HeightStep { get; }
Property Value
- Fixed64
IsValid
Gets whether this compression metadata can be used for height conversion.
public bool IsValid { get; }
Property Value
ReferenceHeight
Ground height represented by a compressed value of zero.
public Fixed64 ReferenceHeight { get; }
Property Value
- Fixed64
Methods
CompressClamped(Fixed64)
Quantizes a ground/contact Y value to the nearest representable short sample.
public short CompressClamped(Fixed64 groundY)
Parameters
groundYFixed64
Returns
Decompress(short)
Converts a compressed sample into environment ground/contact Y.
public Fixed64 Decompress(short compressed)
Parameters
compressedshort
Returns
- Fixed64