This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

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.

Node getNode (int num)

Returns a specified node inside of the world layer.

Arguments

  • int num - Number of the node in range from 0 to the total number of nodes.

Return value

Specified node.

int getNumNodes ()

Returns the number of nodes inside of the world layer.

Return value

Number of nodes.

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.

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.

Arguments

  • float distance - Load distance value, units.

void setNodeGroup (int group)

Sets the a new priority group value. Greater priority means faster loading.
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.
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: ()