Class BSPVisData

  extended by org.jagatoo.loaders.models.bsp.lumps.BSPVisData

public class BSPVisData
extends java.lang.Object

The visibility information is comprised of a bunch of bitsets that store a bit for every cluster. This is because the information is so massive that this way makes it faster to access and a smaller memory footprint. There is only one instance of this structure, but you calculate how much needs to be read in bytes by either: numOfClusters * bytesPerCluster, or minute the size of 2 integers from this lumps length. The pBitsets is then dynamically allocated and stores the calculate bytes. This is probably one of the most confusing parts about the .bsp file format, the visibilty.

Field Summary
 int bytesPerCluster
          Bytes (8 bits) in the cluster's bitset
 int numOfClusters
          The number of clusters
 byte[] pBitsets
          Array of bytes holding the cluster vis.
Constructor Summary
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public int numOfClusters
The number of clusters


public int bytesPerCluster
Bytes (8 bits) in the cluster's bitset


public byte[] pBitsets
Array of bytes holding the cluster vis.

Constructor Detail


public BSPVisData()