visibility

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2018 License: Unlicense Imports: 0 Imported by: 5

Documentation

Index

Constants

View Source
const DVIS_PAS = 1
View Source
const DVIS_PVS = 0
View Source
const MAX_CLUSTER_SIZE_PER_VIS = 8
View Source
const MAX_MAP_VISIBILITY = 0x1000000

Variables

This section is empty.

Functions

This section is empty.

Types

type Vis

type Vis struct {
	NumClusters int32
	ByteOffset  [][2]int32 // Slice length = NumClusters [0]=offset to PVS bit array for cluster
	BitVectors  []byte     // Compressed bit vectors, contains run-length compression PVS data
}

Visibility data for clusters Includes both PVS (Potential Visible Set) and PAS (Potential Audible Set)

func (*Vis) GetPVSForCluster

func (vis *Vis) GetPVSForCluster(clusterId int16) []bool

Decompress vis data for a given cluster see https://developer.valvesoftware.com/wiki/Source_BSP_File_Format#Visibility for more

func (*Vis) GetVisibleClusters

func (vis *Vis) GetVisibleClusters(clusterId int16) (visibleClusters []int16)

Get all visible clusters ids for a given cluster

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL