loading...
Join the ludiloom Public Alpha Test and help us change the game-making game...
Ludiloom API
last updated on 2009, May 22nd
| Base Concepts | Scene Objects | Data Interface | Gui Overlays | |||
|
Arena Object ObjectTemplate Presence PresenceTemplate RuleBook System |
BillBoard Camera Effect HighlightDecal Light Material MeshDecal |
Model Plane River Road Sound StaticFlora Terrain |
HashTable InterModel Matrix MediaItem Vector |
Button Checkbox CodeEditbox ComboBox Editbox Listbox MenuBar MenuItem |
MenuPopup MultiColumn MultilineEditbox ProgressBar RadioButton ScrollBar ScrollPane SliderBar |
Spinner StaticImage StaticText TabPane ToggleButton Tree Window |
Terrain
A class that access some general variables of the Terrain.
| Method Summary | |
nil | commit () |
nil | flatten (MediaItem brush, int area, int strength, array{} points) |
int | getAlphamapSize () |
int | getHeightmapSize () |
MediaItem | getNormalMap (int index) |
unsigned | getPhysicsMaterial (int index) |
int | getPixelError () |
MediaItem | getTexture (int index) |
int | getTileSize () |
float | getTiling (int index) |
int | getWorldHeight () |
int | getWorldSize () |
nil | init () |
boolean | isEnabled () |
boolean | isLODActive () |
boolean | isNormalMappingActive () |
nil | loadFromMediaItem (MediaItem terrrain) |
nil | lower (MediaItem brush, int area, int strength, array{} points) |
nil | paint (int layer, MediaItem brush, int area, int strength, array{} points) |
nil | raise (MediaItem brush, int area, int strength, array{} points) |
nil | setAlphamap (int layer, MediaItem alphamap) |
nil | setAlphamapSize (int size) |
nil | setDefault () |
nil | setEnabled (boolean enable) |
nil | setHeightmap (MediaItem heightmap) |
nil | setHeightmapSize (int size) |
nil | setLODActive (boolean set) |
nil | setNormalMap (int index, MediaItem normalmap) |
nil | setNormalMappingActive (boolean set) |
nil | setPixelError (int error) |
nil | setTexture (int index, MediaItem texture) |
nil | setTileSize (int size) |
nil | setTiling (int index, number tiling) |
nil | setWorldHeight (int height) |
nil | setWorldSize (int size) |
nil | smooth (MediaItem brush, int area, int strength, array{} points) |
| Method Detail |
commit
nil commit ()- Commits the changes made to the terrain configuration
flatten
nil flatten (MediaItem brush, int area, int strength, array{} points)- Flattens the terrain at the given points with the given brush
- Parameters:
MediaItem brush- Brush image media itemint area- Brush sizeint strength- Brush strengtharray{} points- The points (x,z) where the brush will be applied.
getAlphamapSize
int getAlphamapSize ()- Returns the terrain alphamap image size.
- Returns:
int- size Size of the alphamap
getHeightmapSize
int getHeightmapSize ()- Returns the terrain heightmap image size.
- Returns:
int- size Size of the heightmap
getNormalMap
MediaItem getNormalMap (int index)- Returns the Media Item containing the terrain normal map at index.
- Parameters:
int index- Normal Map index.
- Returns:
MediaItem- Media Item containing the terrain normal map at index.
getPhysicsMaterial
unsigned getPhysicsMaterial (int index)- Returns the ID of the terrain physics material at index.
- Parameters:
int index- Layer index.
- Returns:
unsigned- int ID of the terrain physics material at index.
getPixelError
int getPixelError ()- Returns the terrain LOD max error.
- Returns:
int- error Max pixel error
getTexture
MediaItem getTexture (int index)- Returns the Media Item containing the terrain texture at index.
- Parameters:
int index- Texture index.
- Returns:
MediaItem- Media Item containing the terrain texture at index.
getTileSize
int getTileSize ()- Returns the terrain tiles size.
- Returns:
int- size Size of the tiles
getTiling
float getTiling (int index)- Returns the tiling of the terrain texture at index.
- Parameters:
int index- Texture index.
- Returns:
float- tiling of the terrain texture at index.
getWorldHeight
int getWorldHeight ()- Returns the terrain height in world units.
- Returns:
int- height Height of the terrain
getWorldSize
int getWorldSize ()- Returns the terrain size in world units.
- Returns:
int- size Size of the terrain
init
nil init ()isEnabled
boolean isEnabled ()- Checks if the terrain is enabled or not.
- Returns:
boolean- Whether the terrain is enabled or not.
isLODActive
boolean isLODActive ()- Checks if the terrain LOD is active or not.
- Returns:
boolean- Whether the terrain LOD is active or not.
isNormalMappingActive
boolean isNormalMappingActive ()- Checks if the terrain normal mapping is active or not.
- Returns:
boolean- Whether the terrain normal mapping is active or not.
loadFromMediaItem
nil loadFromMediaItem (MediaItem terrrain)- Loads a terrain from a MediaItem.
- Parameters:
MediaItem terrrain- Terrain Mediaitem.
lower
nil lower (MediaItem brush, int area, int strength, array{} points)- Lowers the terrain at the given points with the given brush
- Parameters:
MediaItem brush- Brush image media itemint area- Brush sizeint strength- Brush strengtharray{} points- The points (x,z) where the brush will be applied.
paint
nil paint (int layer, MediaItem brush, int area, int strength, array{} points)- Paints the terrain layer at the given points with the given brush
- Parameters:
int layer- LayerMediaItem brush- Brush image media itemint area- Brush sizeint strength- Brush strengtharray{} points- The points (x,z) where the brush will be applied.
raise
nil raise (MediaItem brush, int area, int strength, array{} points)- Raises the terrain at the given points with the given brush
- Parameters:
MediaItem brush- Brush image media itemint area- Brush sizeint strength- Brush strengtharray{} points- The points (x,z) where the brush will be applied.
setAlphamap
nil setAlphamap (int layer, MediaItem alphamap)- Sets the selected terrain layer alphamap image
- Parameters:
int layer- LayerMediaItem alphamap- Alphamap image media item
setAlphamapSize
nil setAlphamapSize (int size)- Sets the size of the terrain alphamaps images
- Parameters:
int size- Alphamap size
setDefault
nil setDefault ()- Resets the terrain configuration to it's default
setEnabled
nil setEnabled (boolean enable)- Enables or disables the terrain.
- Parameters:
boolean enable- Whether the terrain is enable or not.
setHeightmap
nil setHeightmap (MediaItem heightmap)- Sets the terrain heightmap image
- Parameters:
MediaItem heightmap- Heightmap image media item
setHeightmapSize
nil setHeightmapSize (int size)- Sets the size of the terrain heightmap image
- Parameters:
int size- Heightmap size
setLODActive
nil setLODActive (boolean set)- Activate or deactivate the terrain LOD.
- Parameters:
boolean set- the terrain LOD active or not.
setNormalMap
nil setNormalMap (int index, MediaItem normalmap)- Sets the normal map of the layer at index.
- Parameters:
int index- Normal map index.MediaItem normalmap- Media Item containing the normal map for the terrain.
setNormalMappingActive
nil setNormalMappingActive (boolean set)- Activate or deactivate the terrain normal mapping.
- Parameters:
boolean set- the terrain normal mapping active or not.
setPixelError
nil setPixelError (int error)- Sets the max error of the terrain LOD
- Parameters:
int error- Max pixel error
setTexture
nil setTexture (int index, MediaItem texture)- Sets the texture of the layer at index.
- Parameters:
int index- Texture index.MediaItem texture- Media Item containing the texture for the terrain.
setTileSize
nil setTileSize (int size)- Sets the size of the terrain tiles
- Parameters:
int size- Tile size
setTiling
nil setTiling (int index, number tiling)- Sets the tiling of the texture of the layer at index.
- Parameters:
int index- Texture index.number tiling- tiling value of the texture for the terrain.
setWorldHeight
nil setWorldHeight (int height)- Sets the height of the terrain in world units.
- Parameters:
int height- World height.
setWorldSize
nil setWorldSize (int size)- Sets the size of the terrain in world units.
- Parameters:
int size- World size.
smooth
nil smooth (MediaItem brush, int area, int strength, array{} points)- Smooths the terrain at the given points with the given brush
- Parameters:
MediaItem brush- Brush image media itemint area- Brush sizeint strength- Brush strengtharray{} points- The points (x,z) where the brush will be applied.

