Struct JobBuild Extends IJob

Public

Public Methods

BuildNode (boundsMin, boundsMax, depth, agentsStart, agentsEnd, nodeOffset, firstFreeChild)
BuildNodeSorted (bucketStart, boundsMin, boundsMax, depth, prefix, levels, nodeOffset, firstFreeChild)

Builds the subtree at nodeOffset from the counting sort's bucket table.

CalculateSpeeds (nodeCount)
ChildBounds (boundsMin, boundsMax, child, childMin, childMax)

Child bounds of a node where child goes from 0 to 7.

ComputeCodes (agentCodes, count, mn, mx, levels)

Fills agentCodes with morton codes for the first count entries of agents.

CountingSortAgents (count, numBuckets, mn, mx, levels)

Orders the first count entries of agents by the cell they fall in at the given depth.

Execute ()

Public Static Methods

AutoLevels (count, childBits)

Sort depth that resolves the tree down to roughly leaf granularity.

MortonCode2D (p, boundsMin, boundsMax, levels)

Child index BuildNode would pick for p at each of the top levels, root level in the high bits.

MortonCode3D (p, boundsMin, boundsMax, levels)

Child index BuildNode would pick for p at each of the top levels, root level in the high bits.

Partition<TAxis> (indices, startIndex, endIndex, positions, splitPoint)

Moves every agent above splitPoint on the given axis to the end of [startIndex, endIndex).

Public Variables

ChildBits

Number of Morton code bits one level of the tree consumes.

Public
agentLayers
Public
agentPositions
Public
agentRadii
Public
agentSpeeds
Public
agentVersions
Public
agents

Length should be greater or equal to agentPositions.Length.

Public
movementPlane
Public
numAgents
Public
outAgentCount

Should have size 1.

Public
outAgentLayers
Public
outAgentPositions
Public
outAgentRadii
Public
outArea

Should have size: InnerNodeCountUpperBound(numAgents)

Public
outBoundingBox

Should have size 2.

Public
outChildPointers

Should have size: InnerNodeCountUpperBound(numAgents)

Public
outMaxRadius

Should have size: InnerNodeCountUpperBound(numAgents)

Public
outMaxSpeeds

Should have size: InnerNodeCountUpperBound(numAgents)

Public

Public Static Variables

MinAgentsForSort

Crowd size below which the counting sort does not pay for itself.

Public Static