ObjectLandscapeTerrain Class
UnigineScript is deprecated and will be removed in future releases. Please consider using C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt is not guaranteed, as the current level of support assumes only fixing critical issues.
Inherits: | Object |
ObjectLandscapeTerrain Class
Members
ObjectLandscapeTerrain ( ) #
The ObjectLandscapeTerrain constructor.void setActiveTerrain ( int enabled ) #
Sets a value indicating if the landscape terrain is active.Arguments
- int enabled - 1 to set the landscape terrain as active, 0 - to set it as inactive.
int isActiveTerrain ( ) #
Returns a value indicating if the landscape terrain is active.Return value
1 if the landscape terrain is active; otherwise, 0.void setCollisionBicubicFilter ( int filter ) #
Sets a value indicating if height texture bicubic filtering is enabled for collision detection.Arguments
- int filter - 1 to enable height texture bicubic filtering for collision detection, 0 - to disable it.
int isCollisionBicubicFilter ( ) #
Returns a value indicating if height texture bicubic filtering is enabled for collision detection.Return value
1 if height texture bicubic filtering is enabled for collision detection; otherwise, 0.void setIntersectionBicubicFilterHeight ( int height ) #
Sets a value indicating if height texture bicubic filtering is enabled for intersection detection.Arguments
- int height - 1 to enable height texture bicubic filtering for intersection detection, 0 - to disable it.
int isIntersectionBicubicFilterHeight ( ) #
Returns a value indicating if height texture bicubic filtering is enabled for intersection detection.Return value
1 if height texture bicubic filtering is enabled for intersection detection; otherwise, 0.void setIntersectionBicubicFilterNormal ( int normal ) #
Sets a value indicating if normals texture bicubic filtering is enabled for intersection detection.Arguments
- int normal - 1 to enable normals texture bicubic filtering for intersection detection, 0 - to disable it.
int isIntersectionBicubicFilterNormal ( ) #
Returns a value indicating if normals texture bicubic filtering is enabled for intersection detection.Return value
1 if normals texture bicubic filtering is enabled for intersection detection; otherwise, 0.void setIntersectionPrecisionBegin ( float begin ) #
Sets a new start precision value to be used for intersection detection. Intersections are detected with a variable precision, starting from lower value and ending up with a higher one.Normally there's no need to modify this value. In case of intersection detection errors you can try tweaking start and end precision values for optimum balance, but be careful as it may significantly affect performance and accuracy.
Arguments
- float begin - Start precision for intersection detection as a fraction of maximum precision in the [0; 1] range. The default value is 0.5f. Maximum precision is determined by the Engine on the basis of the data of your Landscape Terrain.
float getIntersectionPrecisionBegin ( ) #
Returns the current start precision value used for intersection detection. Intersections are detected with a variable precision, starting from lower value and ending up with a higher one.Normally there's no need to modify this value. In case of intersection detection errors you can try tweaking start and end precision values for optimum balance, but be careful as it may significantly affect performance and accuracy.
Return value
Start precision for intersection detection as a fraction of maximum precision in the [0; 1] range. The default value is 0.5f. Maximum precision is determined by the Engine on the basis of the data of your Landscape Terrain.void setIntersectionPrecisionEnd ( float end ) #
Sets a new ending precision value to be used for intersection detection. Intersections are detected with a variable precision, starting from lower value and ending up with a higher one.Normally there's no need to modify this value. In case of intersection detection errors you can try tweaking start and end precision values for optimum balance, but be careful as it may significantly affect performance and accuracy.
Arguments
- float end - End precision for intersection detection as a fraction of maximum precision in the [0; 1] range. The default value is 1.0f. Maximum precision is determined by the Engine on the basis of the data of your Landscape Terrain.
float getIntersectionPrecisionEnd ( ) #
Returns the current end precision value used for intersection detection. Intersections are detected with a variable precision, starting from lower value and ending up with a higher one.Normally there's no need to modify this value. In case of intersection detection errors you can try tweaking start and end precision values for optimum balance, but be careful as it may significantly affect performance and accuracy.
Return value
End precision for intersection detection as a fraction of maximum precision in the [0; 1] range. The default value is 1.0f. Maximum precision is determined by the Engine on the basis of the data of your Landscape Terrain.int getNumDetailMasks ( ) #
Returns the total number of detail masks of the landscape terrain.Return value
Total number of detail masks of the landscape terrain.TerrainDetailMask getDetailMask ( int num ) #
Returns the detail mask by its index. The number of detail masks is fixed and is equal to 20.Arguments
- int num - Detail mask index in the [0; 19] range.
Return value
Detail mask having the specified index.TerrainDetailMask getDetailMaskSortRender ( int num ) #
Returns the detail mask by its rendering order. The number of detail masks is fixed and is equal to 20, masks rendering order is back to front.Arguments
- int num - Detail mask rendering order, in the [0; 19] range.
Return value
Detail mask having the specified rendering order.TerrainDetailMask findDetailMask ( string name ) #
Returns a child detail's number by its name. The search is performed among the immediate children only.Arguments
- string name - Detail mask name.
Return value
Detail mask having the specified name (if it exists); otherwise, nullptr.void getDetailMasks ( ) #
Builds the list of all detail masks of the landscape terrain and puts them to the specified buffer. The number of detail masks is fixed and is equal to 20.Arguments
void getDetailMasksSortRender ( ) #
Builds the list of all detail masks of the landscape terrain according to their rendering order (back to front) and puts them to the specified buffer. The number of detail masks is fixed and is equal to 20.Arguments
Last update:
2020-04-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)