首页 > 其他 > 详细

Chapter 2: Bounding Volume Hierarchies 层次包围盒

时间:2018-06-08 00:19:07      阅读:298      评论:0      收藏:0      [点我收藏+]

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

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 层次包围盒

原文:https://www.cnblogs.com/TooYoungTsukasa/p/9153315.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!