C# Класс datastructures.SharedDepthBuffer

Represents a depth buffer that is accessable by multiple threads. Internally multiple depth buffers are stored so that each can be accessed by its own thread and no conflicts occur. These depth buffers are merged back into one (by computing max(depthBuffer0, ..., depthBufferN) for every element).
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
_elements float[][]
_maxDims float[]

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

Метод Описание
SharedDepthBuffer ( int elementCount )

Constructs a new shared depth buffer with the size of elementCount

merge ( int threadIndex, Color colorBuffer ) : void

Merges the results from the different threads into one array. Additionally, an array of 2D surfaces (colorBuffer) is provided. Every element of this array was accessed by a different thread. The winning color at every pixel is derived from the winning (the smallest) depth at every pixel.

zeroOut ( int threadIndex ) : void

Zeroes the depth buffer.

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

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

Constructs a new shared depth buffer with the size of elementCount
public SharedDepthBuffer ( int elementCount )
elementCount int The size of the buffer.

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

Merges the results from the different threads into one array. Additionally, an array of 2D surfaces (colorBuffer) is provided. Every element of this array was accessed by a different thread. The winning color at every pixel is derived from the winning (the smallest) depth at every pixel.
public merge ( int threadIndex, Color colorBuffer ) : void
threadIndex int Index of the calling thread, starts at 0.
colorBuffer Color An array of 2D surfaces.
Результат void

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

Zeroes the depth buffer.
public zeroOut ( int threadIndex ) : void
threadIndex int Index of the calling thread, starts at 0
Результат void

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

_elements публичное свойство

public float[][] _elements
Результат float[][]

_maxDims публичное свойство

public float[] _maxDims
Результат float[]