C# Класс Axiom.Media.PixelBox

A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory. In case of a rectangle, depth must be 1. Pixels are stored as a succession of "depth" slices, each containing "height" rows of "width" pixels.
Наследование: BasicBox
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
data System.IntPtr
format PixelFormat
offset int
rowPitch int
slicePitch int

Открытые методы

Метод Описание
Compressed ( PixelFormat format ) : bool

I don't know how to figure this out. For now, just deal with the DXT* formats

GetSubVolume ( BasicBox def ) : PixelBox

Return a subvolume of this PixelBox.

This function does not copy any data, it just returns a PixelBox object with a data pointer pointing somewhere inside the data of object. Throws an Exception if def is not fully contained.

PixelBox ( ) : System

Parameter constructor for setting the members manually

PixelBox ( BasicBox extents, PixelFormat format ) : System
PixelBox ( int width, int height, int depth, PixelFormat format ) : System
PixelBox ( int width, int height, int depth, PixelFormat format, IntPtr data ) : System

Constructor providing width, height and depth. This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)

SetConsecutive ( ) : void

Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.

Приватные методы

Метод Описание
PixelBox ( BasicBox extents, PixelFormat format, IntPtr data ) : System

Constructor providing extents in the form of a Box object. This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)

Описание методов

Compressed() публичный статический Метод

I don't know how to figure this out. For now, just deal with the DXT* formats
public static Compressed ( PixelFormat format ) : bool
format PixelFormat
Результат bool

GetSubVolume() публичный Метод

Return a subvolume of this PixelBox.
This function does not copy any data, it just returns a PixelBox object with a data pointer pointing somewhere inside the data of object. Throws an Exception if def is not fully contained.
public GetSubVolume ( BasicBox def ) : PixelBox
def BasicBox Defines the bounds of the subregion to return
Результат PixelBox

PixelBox() публичный Метод

Parameter constructor for setting the members manually
public PixelBox ( ) : System
Результат System

PixelBox() публичный Метод

public PixelBox ( BasicBox extents, PixelFormat format ) : System
extents BasicBox
format PixelFormat
Результат System

PixelBox() публичный Метод

public PixelBox ( int width, int height, int depth, PixelFormat format ) : System
width int
height int
depth int
format PixelFormat
Результат System

PixelBox() публичный Метод

Constructor providing width, height and depth. This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)
public PixelBox ( int width, int height, int depth, PixelFormat format, IntPtr data ) : System
width int Width of the region
height int Height of the region
depth int Depth of the region
format PixelFormat Format of this buffer
data System.IntPtr Pointer to the actual data
Результат System

SetConsecutive() публичный Метод

Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.
public SetConsecutive ( ) : void
Результат void

Описание свойств

data защищенное свойство

The data pointer. We do not own this.
protected IntPtr,System data
Результат System.IntPtr

format защищенное свойство

The pixel format
protected PixelFormat format
Результат PixelFormat

offset защищенное свойство

A byte offset into the data
protected int offset
Результат int

rowPitch защищенное свойство

Number of elements between the leftmost pixel of one row and the left pixel of the next. This value must always be equal to getWidth() (consecutive) for compressed formats.
protected int rowPitch
Результат int

slicePitch защищенное свойство

Number of elements between the top left pixel of one (depth) slice and the top left pixel of the next. This can be a negative value. Must be a multiple of rowPitch. This value must always be equal to getWidth()*getHeight() (consecutive) for compressed formats.
protected int slicePitch
Результат int