KiCad PCB EDA Suite
CompareToMid Struct Reference

Public Member Functions

 CompareToMid (int d, float m)
 
bool operator() (const BVHPrimitiveInfo &a) const
 

Public Attributes

int dim
 
float mid
 

Detailed Description

Definition at line 371 of file cbvh_pbrt.cpp.

Constructor & Destructor Documentation

◆ CompareToMid()

CompareToMid::CompareToMid ( int  d,
float  m 
)
inlineexplicit

Definition at line 373 of file cbvh_pbrt.cpp.

373 { dim = d; mid = m; }

References dim, and mid.

Member Function Documentation

◆ operator()()

bool CompareToMid::operator() ( const BVHPrimitiveInfo a) const
inline

Definition at line 378 of file cbvh_pbrt.cpp.

379  {
380  return a.centroid[dim] < mid;
381  }

References BVHPrimitiveInfo::centroid, dim, and mid.

Member Data Documentation

◆ dim

int CompareToMid::dim

Definition at line 375 of file cbvh_pbrt.cpp.

Referenced by CompareToMid(), and operator()().

◆ mid

float CompareToMid::mid

Definition at line 376 of file cbvh_pbrt.cpp.

Referenced by CompareToMid(), and operator()().


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