terrain

package
v0.0.0-...-542943e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AverageVec

func AverageVec(vecs ...glm.Vec3) glm.Vec3

AverageVec returns the average of the vectors. they must be normalized.

func NewTerrain

func NewTerrain(heightmap [][]float32, scale float32) (lux.Mesh, error)

NewTerrain returns a (n-2)(n-2) heightmap. We need the 4 adjacent vertices to accuratelly calculate normals.

func NormalToPlane

func NormalToPlane(v1, v2, v3 glm.Vec3) glm.Vec3

NormalToPlane returns the normal to the triangle defined by the 3 vertices given TODO: move to a math package

Types

This section is empty.

Jump to

Keyboard shortcuts

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