This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

WorldLayer Class

This class describes how to create and modify world layers.

WorldLayer Class

This class inherits from Node

Members


WorldLayer (vec3 size, string name)

Constructor. Creates a new layer with the specified parameters.

Arguments

  • vec3 size - Size of the new layer.
  • string name - Name of the new layer.

float getClearDistance ()

Returns the current clear distance parameter value.

Return value

Clear distance value, units.

float getLoadDistance ()

Returns the current load distance parameter value.

Return value

Load distance value, units.

int getNodeGroup ()

Returns the current priority group value.

Return value

Priority group value.

string getNodeName ()

Returns the current name of the world node.

Return value

World node name.

float getNodeWeight ()

Returns the current node weight value.

Return value

Weight value.

vec3 getOffset ()

Returns the current coordinates of the layer box center.

Return value

Layer box center coordinates.

vec3 getSize ()

Returns the current size of the layer.

Return value

Size of the layer.

int isPoint ()

Returns a value indicating if the layer is set as Point (its distance is counted from the bounding box center).

Return value

1 if the layer is set as Point; otherwise - 0.

void setClearDistance (float distance)

Sets a new clear distance parameter value. Starting with this distance, the node wouldn't be loaded in the background. The default is INFINITY.

Arguments

  • float distance - Clear distance value, units.

void setLoadDistance (float distance)

Sets a new load distance parameter value. Starting with this distance, the node will be loaded in the background. The default is -INFINITY.

Arguments

  • float distance - Load distance value, units.

void setNodeGroup (int group)

Sets the a new priority group value. Greater priority means faster loading. The default value is 0.
Notice
Layers with identical groups and weights will be loaded in the alphabetical order.

Arguments

  • int group - Priority group value.

void setNodeName (string name)

Sets the new world node name.

Arguments

  • string name - Name of the node.

void setNodeWeight (float weight)

Sets the node weight value. Greater weight means faster loading inside the same priority group. The default value is 0.
Notice
Layers with identical groups and weights will be loaded in the alphabetical order.

Arguments

  • float weight - New weight value.

void setOffset (vec3 offset)

Sets coordinates of the layer box center.

Arguments

  • vec3 offset - Layer box center coordinates.

void setPoint (int point)

Sets a layer as Point (its distance is counted from the bounding box center).

Arguments

  • int point - 1 to enable Point flag; 0 to disable it.

void setSize (vec3 size)

Sets the new size for the layer.

Arguments

  • vec3 size - New size of the layer.
Last update: 2017-07-03
Build: ()