Base interface for classes that represent buffers for heightmap sample values.
Subclasses provide an array that stores the buffer samples. This array can be accessed as follows:
Samples[Offset + y * Stride + x * TupleSize + z] := value
y are the coordinates of the buffer sample and
z is the index of the tuple component to access.
Perform an in-place Transform of the samples in the given region.
For square regions (i.e. same width and height), all Transforms can be applied in-place. For rectangular regions, width and height might be swapped ( Transforms.WillSwapAxes) while the top-left sample of the given region remains in the same place.
If this sample buffer is not big enough to hold the swapped width resp. height, output samples will be discarded.
This method reads samples from the given input region and writes samples to the transformed output region. No other sample are accessed by this method.
Clones the sample buffer.
The original and cloned buffers will share the buffer samples. Use this method if you need a separate buffer instance (e.g. for configuring buffer specific properties while keeping the original buffer unmodified).
Returns a densely packed sample buffer object that contains the same data as this buffer.
- See also
Scales the buffer samples and adds the given offset.
Each tuple component (see TupleSize) of each buffer sample is modified according to this formula:
v' := clamp(round(scale * v + offset))
v is the sample value currently present in the buffer,
v' is the transformed sample and
round are some buffer specific functions that convert the transformed samples back to valid buffer values.
Transfers image pixels into the sample buffer.
Transfers buffer samples to the image scanline.
Represents an ISampleBuffer object that represents a rectangular subregion of this sample buffer.
Modifications made to this sample buffer will be visible to the returned buffer and vice versa.
The PixelFormat of this sample buffer, when being read as an image.
The PixelRange of this buffer, where raw pixels values correspond to the buffer samples.
Replaces the values in this sample buffer with the pixels read from the given source image.
If an I/O error has occurred while reading the image pixels.