Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::BspLevel::VisData Struct Reference

Internal lookup table to determine visibility between leaves. More...

`#include <OgreBspLevel.h>`

List of all members.

## Public Attributes

unsigned char * | tableData
int | numClusters
int | rowLength

## Detailed Description

Internal lookup table to determine visibility between leaves.

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.

## Member Data Documentation

int Ogre::BspLevel::VisData::numClusters

| Definition at line 173 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::loadQuake3Level().

int Ogre::BspLevel::VisData::rowLength

| Definition at line 174 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::isLeafVisible(), and Ogre::BspLevel::loadQuake3Level().

unsigned char* Ogre::BspLevel::VisData::tableData

| Definition at line 172 of file OgreBspLevel.h. Referenced by Ogre::BspLevel::BspLevel(), Ogre::BspLevel::isLeafVisible(), Ogre::BspLevel::loadQuake3Level(), and Ogre::BspLevel::unload().

The documentation for this struct was generated from the following file:

- OgreBspLevel.h

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:47 2004