leaf

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: 8

Documentation

Index

Constants

View Source
const BITMASK_LOWER7 = 0x7F // 127 (2^7 - 1)
View Source
const BITMASK_LOWER9 = 0x1FF // 511 (2^9 - 1)
View Source
const LEAF_FLAGS_RADIAL = 0x02 // This leaf culled away some portals due to radial vis
View Source
const LEAF_FLAGS_SKY = 0x01 // This leaf has 3D sky in its PVS

NOTE: Only 7-bits stored!!!

View Source
const LEAF_FLAGS_SKY2D = 0x04 // This leaf has 2D sky in its PVS

Variables

This section is empty.

Functions

This section is empty.

Types

type Leaf

type Leaf struct {
	Contents        int32
	Cluster         int16
	BitField        int16 //C Union of char Name || Area:9 && Flags:7
	Mins            [3]int16
	Maxs            [3]int16
	FirstLeafFace   uint16
	NumLeafFaces    uint16
	FirstLeafBrush  uint16
	NumLeafBrushes  uint16
	LeafWaterDataID int16
	// contains filtered or unexported fields
}

func (*Leaf) Area

func (b *Leaf) Area() int16

Get area (first 9 bits)

func (*Leaf) Flags

func (b *Leaf) Flags() int16

Get flags (second 7 bits)

func (*Leaf) SetArea

func (b *Leaf) SetArea(area int16)

Set area (first 9 bits)

func (*Leaf) SetFlags

func (b *Leaf) SetFlags(flags int16)

Set flags (second 7 bits)

Jump to

Keyboard shortcuts

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