Krig Game Engine
Functions
api_terrain.cpp File Reference

Krig Game Engine Lua Scripting API - Terrain. More...

Functions

float get_vertex_height (int, int)
 
void set_vertex_height (int, int, float)
 
Vector3 get_vertex_color (int, int)
 
void set_vertex_color (int, int, Vector3)
 
float get_vertex_type (int, int)
 
void set_vertex_type (int, int, int)
 
float get_height (float, float)
 
int luaopen_krigTerrain (lua_State *L)
 

Detailed Description

Krig Game Engine Lua Scripting API - Terrain.

Terrain API functionality.

Function Documentation

◆ get_height()

float get_height ( float  ,
float   
)

Get height of terrain at specified x,z world coordinates.

Parameters
floatx coordinate.
floatz coordinate.
Returns
float - height.

◆ get_vertex_color()

Vector3 get_vertex_color ( int  ,
int   
)

Get color of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
Returns
Vector3

◆ get_vertex_height()

float get_vertex_height ( int  ,
int   
)

Get height of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
Returns
float

◆ get_vertex_type()

float get_vertex_type ( int  ,
int   
)

Get type of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
Returns
float - type.

◆ set_vertex_color()

void set_vertex_color ( int  ,
int  ,
Vector3   
)

Set type of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
Vector3containing r,g,b values.
Returns
n/a.

◆ set_vertex_height()

void set_vertex_height ( int  ,
int  ,
float   
)

Set height of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
floatheight
Returns
n/a.

◆ set_vertex_type()

void set_vertex_type ( int  ,
int  ,
int   
)

Set type of terrain at specified x,z grid coordinates.

Parameters
intx coordinate.
intz coordinate.
inttype.
Returns
n/a.