C# Class 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).
ファイルを表示 Open project: denniskb/asvo_cuda

Public Properties

Property Type Description
_elements float[][]
_maxDims float[]

Public Methods

Method Description
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.

Method Details

SharedDepthBuffer() public method

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

merge() public method

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.
return void

zeroOut() public method

Zeroes the depth buffer.
public zeroOut ( int threadIndex ) : void
threadIndex int Index of the calling thread, starts at 0
return void

Property Details

_elements public_oe property

public float[][] _elements
return float[][]

_maxDims public_oe property

public float[] _maxDims
return float[]