游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2071|回复: 3

??BSP Trees and Polygon???"RENDER-PORTAL-ENGINE&am

[复制链接]

8

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
发表于 2004-8-5 17:32:00 | 显示全部楼层 |阅读模式
Portal Rendering???27?

???????????????????

RENDER-PORTAL-ENGINE (Sector, ViewFrustum)
1 for each polygon P1 in Sector
2     if (P1 is a portal and INSIDE-FRUSTUM (ViewFrustum, P1))
3        NewFrustum = CLIP-FRUSTUM (ViewFrustum, P1)
4        NewSector = get the sector that is connected with the current sector through portal P1
5        RENDER-PORTAL-ENGINE (NewSector, NewFrustum)
6     else if (P1 has not been drawn yet)
7        draw P1
8 return

???????Viewer??Sector??????????????(ViewFrustum)????????????? if ???????

if (P1 is a portal and INSIDE-FRUSTUM (ViewFrustum, P1)) {...}
else if (P1 has not been drawn yet) {...}

???????Sector??????????????????????????????

?????????????

RENDER-PORTAL-ENGINE (Sector, ViewFrustum)
1 for each polygon P1 in Sector
2     if (INSIDE-FRUSTUM (ViewFrustum, P1))
3        if (P1 is a portal)
4             NewFrustum = CLIP-FRUSTUM (ViewFrustum, P1)
5             NewSector = get the sector that is connected with the current sector through portal P1
6        RENDER-PORTAL-ENGINE (NewSector, NewFrustum)
7          else if (P1 has not been drawn yet)
8                 draw P1
9 return

???????????????

(??"Binary Space Partioning Trees and Polygon"?????????????????????????????????????

20

主题

473

帖子

502

积分

高级会员

Rank: 4

积分
502
发表于 2004-8-6 10:33:00 | 显示全部楼层

Re:??BSP Trees and Polygon???"RENDER-PORTAL-ENGINE&quo

a.  if (P1 is a portal and INSIDE-FRUSTUM (ViewFrustum, P1))

b.    if (INSIDE-FRUSTUM (ViewFrustum, P1))
        if (P1 is a portal)

a ??b ?????????????????????????????????

8

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2004-8-6 12:56:00 | 显示全部楼层

Re:??BSP Trees and Polygon???RENDER-PORTAL-ENGINE?

???????polygon???portal,???????????????
????????polygon??portal,???????? (P1 has not been drawn yet) ?????portal?polygon?????????????????????????????????

??????????polygon?portal,????????????????3?4?5?????????????? 7 draw p1 !!!! ??portal??????? draw ?

??????????:

1 for each polygon P1 in Sector
     {
2     if (P1 is a portal and INSIDE-FRUSTUM (ViewFrustum, P1))
          {
3         NewFrustum = CLIP-FRUSTUM (ViewFrustum, P1)
4         NewSector = get the sector that is connected with the current sector through portal P1
5          RENDER-PORTAL-ENGINE (NewSector, NewFrustum)
          }
6     else if (P1 has not been drawn yet)
7              { draw P1 }
      }
8 return

20

主题

473

帖子

502

积分

高级会员

Rank: 4

积分
502
发表于 2004-8-6 16:29:00 | 显示全部楼层

Re:??BSP Trees and Polygon???"RENDER-PORTAL-ENGINE&quo

?????????and ???c????&&??????????
???????????????else?

??portol??????

????portal?????????portal->draw??????????????portal??????????debug
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-21 20:06

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表