[Implemented] Better terrain functions

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

[Implemented] Better terrain functions

Post by Num3 »

TerrainTexture(worldtexture, detailtexture,DetailTile)

Code: Select all

WorldTexture=main texture
DetailTexture=detail texture
Detail Tile=number of times that the detail texture will be repeated in each terrain tile
TerrainSize(PageSize,TileSize, MaxMipMapLevel)

Code: Select all

PageSize = nb of quads in terrain
TileSize = nb of quads in each tile (page)
MaxMipMapLevel = number of levels of detail
TerrainSetHeight(x,z, height)

Code: Select all

Change the height of the terrain in the specified x,z coordinate
TerrainGetHeight(x,z)

Code: Select all

Retrieve the height of the terrain in the specified x,z coordinate
CreateTerrain(Filename$, [ScaleX, ScaleY, ScaleZ, [Precision]])

Code: Select all

Material ID is removed from create terrain
CreateTerrainMemory(pointertoimagefile, [ScaleX, ScaleY, ScaleZ, [Precision]])

Code: Select all

Uses an heigthmap loaded into memory via loadimage
PickTerrainDistance(maxdistance)

Code: Select all

Sets maximum terrain pick distance
PickTerrain(#camera,x,y)

Code: Select all

Checks if x, y coordinate returns true on terrain
PickedTerrainX()

Code: Select all

returns X coordinate of picked terrain
PickTerrainY()

Code: Select all

returns Y coordinate of picked terrain
PickTerrainZ()

Code: Select all

returns Z coordinate of picked terrain