gen

package
v0.0.0-...-dcead42 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountCollisionNeighbors

func CountCollisionNeighbors(field h.Field[bool], coord h.Vector) (int, bool)

func CountFloorNeighbors

func CountFloorNeighbors(field h.Field[bool], coord h.Vector) (int, bool)

func GenCollisions

func GenCollisions(size h.Vector) h.Field[bool]

func GenRandom

func GenRandom(size h.Vector, percentFill int) h.Field[bool]

func GetDepthMap

func GetDepthMap(collisions h.Field[bool]) (h.Field[int], int)

func GetFloorNearCollision

func GetFloorNearCollision(collisions h.Field[bool]) []h.Vector

func GetNeighborCoords

func GetNeighborCoords(coord h.Vector) [8]h.Vector

func Smooth

func Smooth(collisions h.Field[bool], minNeighbors int) h.Field[bool]

func SmoothRoughness

func SmoothRoughness(collisions h.Field[bool]) h.Field[bool]

Types

type Area

type Area struct {
	Id         int
	NumOfCells int
}

func GetAreas

func GetAreas(collisions h.Field[bool]) ([]Area, h.Field[int])

Jump to

Keyboard shortcuts

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