/* =============== MarkVisibleSides_r =============== */ void MarkVisibleSides_r (node_t *node) { portal_t *p; int s; if (node->planenum != PLANENUM_LEAF) { MarkVisibleSides_r (node->children[0]); MarkVisibleSides_r (node->children[1]); return; } // empty leafs are never boundary leafs if (!node->contents) return; // see if there is a visible face for (p=node->portals ; p ; p = p->next[!s]) { s = (p->nodes[0] == node); if (!p->onnode) continue; // edge of world if (!p->sidefound) FindPortalSide (p); if (p->side) p->side->visible = true; } }
//=========================================================================== // // Parameter: - // Returns: - // Changes Globals: - //=========================================================================== void MarkVisibleSides_r( node_t *node ) { portal_t *p; int s; if ( node->planenum != PLANENUM_LEAF ) { MarkVisibleSides_r( node->children[0] ); MarkVisibleSides_r( node->children[1] ); return; } //end if // empty leaves are never boundary leaves if ( !node->contents ) { return; } // see if there is a visible face for ( p = node->portals ; p ; p = p->next[!s] ) { s = ( p->nodes[0] == node ); if ( !p->onnode ) { continue; // edge of world } if ( !p->sidefound ) { FindPortalSide( p ); } if ( p->side ) { p->side->flags |= SFL_VISIBLE; } } //end for } //end of the function MarkVisibleSides_r