org.jagatoo.loaders.models.bsp
Class BSPClusterManager
java.lang.Object
org.jagatoo.loaders.models.bsp.BSPClusterManager
- All Implemented Interfaces:
- BSPVisibilityUpdater
public class BSPClusterManager
- extends java.lang.Object
- implements BSPVisibilityUpdater
This class is used to manage the visibility of all the BSP clusters.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shapeBitset
protected final java.util.BitSet shapeBitset
BSPClusterManager
public BSPClusterManager(BSPVisData bspVisData,
int[][][] clusterLeafs,
int[] leafToCluster,
float[] planes,
int[] nodes,
java.util.BitSet shapeBitset)
BSPClusterManager
public BSPClusterManager(BSPClusterManager template)
getBitSet
public final java.util.BitSet getBitSet()
- Specified by:
getBitSet in interface BSPVisibilityUpdater
setPVSUsage
public void setPVSUsage(boolean enabled)
- Enables or disables PVS usage.
- Parameters:
enabled - if true the PVS is used to disable hidden geometry, false and everything is enabled
isPVSUsed
public boolean isPVSUsed()
- Returns:
- true, if the PVS is used to disable hidden geometry. false, and everything is enabled
updateVisibility
public boolean updateVisibility(org.openmali.vecmath2.Matrix4f cameraTransform)
- Disables geometry that is invisible according to the PVS
- Specified by:
updateVisibility in interface BSPVisibilityUpdater
- Parameters:
camPos - the position of the camera
- Returns:
- true, if PVS has changed.
create
public static BSPClusterManager create(BSPScenePrototype prototype,
java.util.BitSet faceBitset)
- Creates a BSPClusterManager from the visdata contained in the prototype.
- Parameters:
prototype - faceBitset -