Documentation
¶
Index ¶
- type BlendMapGenerator
- type Chunk
- type HeightMap
- func (heightMap *HeightMap) GetBiTangent(x int, z int) GeometryMath.Vector3
- func (heightMap *HeightMap) GetHeight(x int, z int) float32
- func (heightMap *HeightMap) GetHeightScaled(x int, z int) float32
- func (heightMap *HeightMap) GetNormal(x int, z int) GeometryMath.Vector3
- func (heightMap *HeightMap) GetTangent(x int, z int) GeometryMath.Vector3
- func (heightMap *HeightMap) UnmarshalYAML(value *yaml.Node) error
- type ITerrain
- type PlacementMap
- type PlacementMapGenerator
- type Range
- type Terrain
- func (terrain *Terrain) Draw(shader Shader.IShaderProgram, invoker Scene.IDrawable, scene Scene.IScene, ...) error
- func (terrain *Terrain) GetHeightAt(terrainPos GeometryMath.Vector3) float32
- func (terrain *Terrain) SetModelMatrix(mat GeometryMath.Matrix4x4)
- func (terrain *Terrain) UnmarshalYAML(value *yaml.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlendMapGenerator ¶
func (*BlendMapGenerator) GenerateBlendMap ¶
func (generator *BlendMapGenerator) GenerateBlendMap(heightMap *HeightMap) (*Texture.Texture2D, error)
type HeightMap ¶
type HeightMap struct {
NumRows int
NumColumns int
Scale float32
// contains filtered or unexported fields
}
func ImportHeightMap ¶
func NewHeightMapFromGrey ¶
func (*HeightMap) GetBiTangent ¶
func (heightMap *HeightMap) GetBiTangent(x int, z int) GeometryMath.Vector3
func (*HeightMap) GetHeightScaled ¶
func (*HeightMap) GetNormal ¶
func (heightMap *HeightMap) GetNormal(x int, z int) GeometryMath.Vector3
func (*HeightMap) GetTangent ¶
func (heightMap *HeightMap) GetTangent(x int, z int) GeometryMath.Vector3
type ITerrain ¶
type ITerrain interface {
GetHeightAt(terrainPos GeometryMath.Vector3) float32
}
type PlacementMap ¶
type PlacementMap HeightMap
func ImportPlacementMap ¶
func ImportPlacementMap(filename string) (PlacementMap, error)
func NewPlacementMapFromGrey ¶
func NewPlacementMapFromGrey(img *image.Gray) PlacementMap
func (*PlacementMap) GetProbability ¶
func (placementMap *PlacementMap) GetProbability(x int, z int) float32
func (*PlacementMap) GetProbabilityAtArea ¶
func (placementMap *PlacementMap) GetProbabilityAtArea(minX, minZ, maxX, maxZ int) float32
func (*PlacementMap) UnmarshalYAML ¶
func (placementMap *PlacementMap) UnmarshalYAML(value *yaml.Node) error
type PlacementMapGenerator ¶
type PlacementMapGenerator struct {
Ranges []Range `yaml:"ranges"`
}
type Range ¶
type Terrain ¶
type Terrain struct {
Chunks []Chunk
Material *Material.BlendMaterial
TileSize float32
HeightMap HeightMap
OffsetX float32
OffsetZ float32
}
func GenerateTerrain ¶
func (*Terrain) GetHeightAt ¶
func (terrain *Terrain) GetHeightAt(terrainPos GeometryMath.Vector3) float32
func (*Terrain) SetModelMatrix ¶
func (terrain *Terrain) SetModelMatrix(mat GeometryMath.Matrix4x4)
Click to show internal directories.
Click to hide internal directories.