unsigned short CPixelVisibilitySystem::AllocQuery() { unsigned short node = m_queryList.Head(m_freeQueriesList); if ( node != m_queryList.InvalidIndex() ) { m_queryList.Unlink( m_freeQueriesList, node ); } else { node = m_queryList.Alloc(); } return node; }
unsigned short CPixelVisibilitySystem::AllocSet() { unsigned short node = m_setList.Head(m_freeSetsList); if ( node != m_setList.InvalidIndex() ) { m_setList.Unlink( m_freeSetsList, node ); } else { node = m_setList.Alloc(); m_setList[node].queryList = m_queryList.CreateList(); } m_setList.LinkToHead( m_activeSetsList, node ); return node; }