#include <OgreBspLevel.h>
Public Attributes | |
unsigned char * | tableData |
int | numClusters |
int | rowLength |
Leaf nodes are assigned to 'clusters' of nodes, which are used to group nodes together for visibility testing. This data holds a lookup table which is used to determine if one cluster of leaves is visible from another cluster. Whilst it would be possible to expand all this out so that each node had a list of pointers to other visible nodes, this would be very expensive in terms of storage (using the cluster method there is a table which is 1-bit squared per cluster, rounded up to the nearest byte obviously, which uses far less space than 4-bytes per linked node per source node). Of course the limitation here is that you have to each leaf in turn to determine if it is visible rather than just following a list, but since this is only done once per frame this is not such a big overhead. Each row in the table is a 'from' cluster, with each bit in the row corresponding to a 'to' cluster, both ordered based on cluster index. A 0 in the bit indicates the 'to' cluster is not visible from the 'from' cluster, whilst a 1 indicates it is. As many will notice, this is lifted directly from the Quake implementation of PVS.
Definition at line 170 of file OgreBspLevel.h.
|
Definition at line 173 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 174 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::isLeafVisible(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 172 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::BspLevel(), Ogre::BspLevel::isLeafVisible(), Ogre::BspLevel::loadQuake3Level(), and Ogre::BspLevel::unload(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:47 2004