leaf

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: 1 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// LeafFlagsSky This leaf has 3D sky in its PVS
	LeafFlagsSky = 0x01
	// LeafFlagsRadial This leaf culled away some portals due to radial vis
	LeafFlagsRadial = 0x02
	// LeafFlagsSky2D This leaf has 2D sky in its PVS
	LeafFlagsSky2D = 0x04
)

NOTE: Only 7-bits stored!!!

Variables

This section is empty.

Functions

This section is empty.

Types

type Leaf

type Leaf struct {
	// Contents
	Contents int32
	// Cluster that this leaf is a part of
	Cluster int16
	// BitField is a C Union of char Name || Area:9 && Flags:7
	BitField int16
	// Mins is this leafs bounding volumes minimum
	Mins [3]int16
	// Maxs  is this leafs bounding volumes maximum
	Maxs [3]int16
	// FirstLeafFace index into LeafFaces lump data
	FirstLeafFace uint16
	// NumLeafFaces is number of LeafFaces in this Leaf
	NumLeafFaces uint16
	// FirstLeafBrush is index into LeafBrushes lump data
	FirstLeafBrush uint16
	// NumLeafBrushes is number of LeafBrushes in this Leaf
	NumLeafBrushes uint16
	// LeafWaterDataID
	LeafWaterDataID int16

	// LightSample
	LightSample common.CompressedLightCube
	// contains filtered or unexported fields
}

Leaf represents a single convex volume that contains 0 or more faces (or entities) within its bounds

func (*Leaf) Area

func (b *Leaf) Area() int16

Area returns area (first 9 bits)

func (*Leaf) Flags

func (b *Leaf) Flags() int16

Flags returns flags (second 7 bits)

func (*Leaf) SetArea

func (b *Leaf) SetArea(area int16)

SetArea sets area (first 9 bits)

func (*Leaf) SetFlags

func (b *Leaf) SetFlags(flags int16)

SetFlags sets flags (second 7 bits)

Jump to

Keyboard shortcuts

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