visibility

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Unlicense Imports: 0 Imported by: 6

Documentation

Index

Constants

View Source
const MaxMapVisibility = 0x1000000

MaxMapVisibility is the maximum size of visibility data in bytes

View Source
const VisPAS = 1

VisPAS index

View Source
const VisPVS = 0

VisPVS index

Variables

This section is empty.

Functions

This section is empty.

Types

type Vis

type Vis struct {
	// NumClusters is number of computed cluster
	NumClusters int32
	// ByteOffset contains offsets for cluster pvs and pas
	// Slice length = NumClusters [0]=offset to PVS bit array for cluster
	ByteOffset [][2]int32
	// BitVectors are compressed bit vectors, contains run-length compression PVS data
	BitVectors []byte
}

Vis contains 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

GetPVSForCluster decompresses 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)

GetVisibleClusters returns 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