KiCad PCB EDA Suite
BVHBuildNode Struct Reference

Public Member Functions

void InitLeaf (int first, int n, const CBBOX &b)
void InitInterior (int axis, BVHBuildNode *c0, BVHBuildNode *c1)

Public Attributes

CBBOX bounds
BVHBuildNodechildren [2]
int splitAxis
int firstPrimOffset
int nPrimitives

Detailed Description

Definition at line 104 of file cbvh_pbrt.cpp.

Member Function Documentation

◆ InitInterior()

void BVHBuildNode::InitInterior ( int  axis,
BVHBuildNode c0,
BVHBuildNode c1 

Definition at line 115 of file cbvh_pbrt.cpp.

116  {
117  children[0] = c0;
118  children[1] = c1;
119  bounds.Set( c0->bounds );
120  bounds.Union( c1->bounds );
121  splitAxis = axis;
122  nPrimitives = 0;
123  }
void Set(const SFVEC3F &aPbMin, const SFVEC3F &aPbMax)
Function Set Set bounding box with new parameters.
Definition: cbbox.cpp:67
void Union(const SFVEC3F &aPoint)
Function Union recalculate the bounding box adding a point.
Definition: cbbox.cpp:105
BVHBuildNode * children[2]
Definition: cbvh_pbrt.cpp:126

References bounds, children, nPrimitives, CBBOX::Set(), splitAxis, and CBBOX::Union().

Referenced by CBVH_PBRT::buildUpperSAH(), CBVH_PBRT::emitLBVH(), and CBVH_PBRT::recursiveBuild().

◆ InitLeaf()

void BVHBuildNode::InitLeaf ( int  first,
int  n,
const CBBOX b 

Definition at line 107 of file cbvh_pbrt.cpp.

108  {
109  firstPrimOffset = first;
110  nPrimitives = n;
111  bounds = b;
112  children[0] = children[1] = NULL;
113  }
int firstPrimOffset
Definition: cbvh_pbrt.cpp:127
BVHBuildNode * children[2]
Definition: cbvh_pbrt.cpp:126

References bounds, children, firstPrimOffset, and nPrimitives.

Referenced by CBVH_PBRT::emitLBVH(), and CBVH_PBRT::recursiveBuild().

Member Data Documentation

◆ bounds

◆ children

◆ firstPrimOffset

int BVHBuildNode::firstPrimOffset

◆ nPrimitives

◆ splitAxis

The documentation for this struct was generated from the following file: