Definition
double,double,double GetTerrainDiffuse()
Description
This function returns the diffuse color of terrain object as three values of red, green and blue. Each value ranges from 0 to 1.
Return Value
Diffuse color of terrain object as three values of red, green and blue. Each value ranges from 0 to 1.
Example
red = 0.0 green = 0.0 blue = 0.0 function Init() red, green, blue = GetTerrainDiffuse() message = string.format("\nTerrain diffuse color is > (%.2f, %.2f, %.2f)" , red, green, blue) PrintConsole(message) end function Update() end
In this example, the GetTerrainDiffuse function returns the value of the red, green, and blue components of the diffuse color of terrain object. Then these three values are displayed on the console by the PrintConsole function.
GetTerrainDiffuse