Documentation ¶
Overview ¶
Package genmapvoronoi is based on https://mewo2.com/notes/terrain/.
Index ¶
- Variables
- func HeightCleanCoast(h *vmesh.Heightmap, iters int) *vmesh.Heightmap
- func HeightFillSinks(h *vmesh.Heightmap) *vmesh.Heightmap
- func HeightNormalize(h *vmesh.Heightmap) *vmesh.Heightmap
- func HeightPeaky(h *vmesh.Heightmap) *vmesh.Heightmap
- func HeightRelax(h *vmesh.Heightmap) *vmesh.Heightmap
- func HeightSetSeaLevel(h *vmesh.Heightmap, q float64) *vmesh.Heightmap
- func MeshCone(m *vmesh.Mesh, slope float64) *vmesh.Heightmap
- func MeshHills(m *vmesh.Mesh, n int, r float64) *vmesh.Heightmap
- func MeshMountains(m *vmesh.Mesh, n int, r float64) *vmesh.Heightmap
- func MeshNoise(m *vmesh.Mesh, slope float64) *vmesh.Heightmap
- func MeshRidges(m *vmesh.Mesh, direction vectors.Vec2) *vmesh.Heightmap
- func MeshSlope(m *vmesh.Mesh, direction vectors.Vec2) *vmesh.Heightmap
- func MeshVolCone(m *vmesh.Mesh, slope float64) *vmesh.Heightmap
- type Extent
- type Item
- type Params
- type PriorityQueue
- type Terrain
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultExtent = &Extent{
Width: 1,
Height: 1,
}
View Source
var DefaultParams = &Params{ Extent: DefaultExtent, NumPoints: 16384, NumCities: 15, NumTerritories: 5, RiverThreshold: 0.005, }
Functions ¶
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
An Item is something we manage in a priority queue.
type PriorityQueue ¶
type PriorityQueue []*queueEntry
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.