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 106 of file cbvh_pbrt.cpp.

Member Function Documentation

◆ InitInterior()

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

Definition at line 117 of file cbvh_pbrt.cpp.

118  {
119  children[0] = c0;
120  children[1] = c1;
121  bounds.Set( c0->bounds );
122  bounds.Union( c1->bounds );
123  splitAxis = axis;
124  nPrimitives = 0;
125  }
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:128

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 109 of file cbvh_pbrt.cpp.

110  {
111  firstPrimOffset = first;
112  nPrimitives = n;
113  bounds = b;
114  children[0] = children[1] = NULL;
115  }
int firstPrimOffset
Definition: cbvh_pbrt.cpp:129
#define NULL
BVHBuildNode * children[2]
Definition: cbvh_pbrt.cpp:128

References bounds, children, firstPrimOffset, nPrimitives, and NULL.

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: