Base class: Entity

Lua
C++
Edit

Terrain

Ultra Engine supports a powerful heightmap terrain system for rendering large landscapes. Multiple terrains can be created and positioned, with up to 256 different materials applied to any single terrain.

Property Type Description
heightmap const shared_ptr<Pixmap>& read-only pixmap containing terrain elevation data
material const shared_ptr<Material>& read-only material containing height and normal textures
resolution const iVec2& read-only terrain resolution
AddLayer Method adds a new terrain material layer
AddMeshLayer Method adds a new terrain mesh layer
Fill Method paints the terrain with the specified material layer
GetElevation Method returns the scaled terrain height
GetHeight Method returns the heightmap height at the specified point
GetLayers Method returns the layers in use at the specified point
GetLayerWeight Method returns the weight of the layer at the specified point
GetLayerHeightConstraints Method returns the layer height contraints
GetLayerMapping Method returns the layer texture mapping mode
GetLayerMaterial Method returns the material used by this layer
GetLayerSlopeConstraints Method returns the layer slope constraints
GetNormal Method returns the normal of the terrain at the specified position
GetSlope Method returns the slope of the terrain at the specified position
GetTileHidden Method gets the visibility of a single terrain tile
LoadHeightmap Method loads a heightmap from a file
SetHeight Method sets the terrain height at the specified point
SetLayerHeightConstraints Method sets the terrain layer height constraints
SetLayerMapping Method sets the terrain layer texture mapping mode
SetLayerScale Method sets the terrain layer texture mapping scale
SetLayerSlopeConstraints Method sets the layer slope constraints
SetLayerWeight Method sets the layer to be used at the specified point
SetTileHidden Method hides or shows a single terrain tile
CreateTerrain Function creates a new terrain entity
Copyright © 2024 Ultra Software.
All rights reserved.