|
|
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"????????????????????????????????????? |
|