Property | Type | Description | |
---|---|---|---|
NumberOfTotalLeafs | int | ||
NumberOfTotalNodes | int |
Method | Description | |
---|---|---|
BuildTree ( int nodeNum, |
Builds the Kd-Tree
|
|
CreateAccelerator ( List |
Creates a new Kd-Tree
|
|
Intersect ( |
Checks if the given ray intersects the primitive.
|
|
IntersectP ( |
A quick check just to test if the ray intersects the primitive. This method doesn't fill in Intersection information, so this method is obviously faster for pure testing.
|
|
KdTree ( List |
Creates a new KdTree
|
public BuildTree ( int nodeNum, |
||
nodeNum | int | /// The current node index /// |
nodeBounds | /// The node's bounding box /// | |
allPrimBounds | List |
/// The primitive's bounding boxes /// |
primNums | int | /// Array of primitive indices /// |
numberOfPrimitives | int | /// Number of primitives to build from /// |
depth | int | /// The current recursion depth /// |
edges | List |
/// Array of edges /// |
prims0 | int | /// /// |
prims1 | int | /// /// |
primIndex | int | |
badRefines | int | /// Amount of bad refines /// |
return | void |
public static CreateAccelerator ( List |
||
primitives | List |
/// List of primitives to include in the Tree /// |
parameterSet | ParameterSet | /// Parameters for the Kd-Tree /// |
return |
public Intersect ( |
||
ray | /// The ray to test for /// | |
intersection | /// A pointer to an Intersection structure that'll hold /// the intersection information. /// | |
return | bool |
public IntersectP ( |
||
ray | /// The ray to test for /// | |
return | bool |
public KdTree ( List |
||
p | List |
/// List of primitives to build the kd-Tree from /// |
isectCost | int | /// Cost for an intersection /// |
traversalCost | int | /// Cost for traversing along edges /// |
emptyBonus | double | /// Bonus for empty leafs /// |
maxPrimitives | int | /// Maximum amount of primitives per leaf /// |
maxDepth | int | /// Maximum recursion depth /// |
return | System |