Chapter 2: Bounding Volume Hierarchies 层次包围盒

Posted tooyoungtsukasa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Chapter 2: Bounding Volume Hierarchies 层次包围盒相关的知识,希望对你有一定的参考价值。

关键是找一个完全包裹所有对象的盒子:

if (ray hits bounding object)
  return whether ray hits bounded objects
else
  return false

  技术分享图片

例如,我们把对象集分为两组,红和蓝,然后用矩形包围他们:

if (hits purple)
  hit0 = hits blue enclosed objects
  hit1 = hits red enclosed objects
  if (hit0 or hit1)
    return true and info of closer hit
return false

   技术分享图片

  技术分享图片

 









以上是关于Chapter 2: Bounding Volume Hierarchies 层次包围盒的主要内容,如果未能解决你的问题,请参考以下文章