# 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 175 of file OgreBspLevel.h.

## Member Data Documentation

int Ogre::BspLevel::VisData::numClusters

| Definition at line 178 of file OgreBspLevel.h.

int Ogre::BspLevel::VisData::rowLength

| Definition at line 179 of file OgreBspLevel.h.

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

| Definition at line 177 of file OgreBspLevel.h.

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

- OgreBspLevel.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:05:18 2006