This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
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.

Unigine.WorldLayer Class

Inherits:Node

This class describes how to create and modify world layers.

WorldLayer Class

Members


static 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.

WorldLayer cast(Node node)

Casts a WorldLayer out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

WorldLayer instance.

void setClearDistance(float distance)

Sets the clearing distance. Starting with this distance, the node wouldn't be loaded in the background. The default is inf.

Arguments

  • float distance - Clear distance value, units.

float getClearDistance()

Returns the current clearing distance. Starting with this distance, the node wouldn't be loaded in the background.

Return value

Current clearing distance in units. The default is inf.

void setLoadDistance(float distance)

Sets a new loading distance. Starting with this distance, the node will be loaded in the background. The default is -inf.

Arguments

  • float distance - Load distance value, units.

float getLoadDistance()

Returns the current loading distance. Starting with this distance, the node will be loaded in the background.

Return value

Loading distance in units. The default is -inf.

Node getNode(int num)

Returns a node pointer.

Arguments

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

Return value

Node pointer.

Node getNode()

Returns a node pointer.

Return value

Node pointer.

void setNodeGroup(int group)

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

Arguments

  • int group - Priority group value.

int getNodeGroup()

Returns the current priority group value. Greater priority means faster node loading. The default value is 0.

Return value

Priority group value.

void setNodeName(string name)

Sets a path to a node.

Arguments

  • string name - Name of the node.

string getNodeName()

Returns the path to the node.

Return value

Path to the *.node file.

void setNodeWeight(float weight)

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

Arguments

  • float weight - New weight value.

float getNodeWeight()

Returns the current priority weight value.

Return value

Current priority weight value.

int getNumNodes()

Returns the number of nodes contained in the world layer.

Return value

Number of nodes.

void setOffset(vec3 offset)

Sets offset of coordinates of the layer box center.

Arguments

  • vec3 offset - Layer box center coordinates.

vec3 getOffset()

Returns the current offset of coordinates of the layer box center.

Return value

Current offset of layer box center.

void setPoint(int point)

Sets a point mode for the layer (its distance is counted from the bounding box center).

Arguments

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

int isPoint()

Returns a value indicating if a point mode is set for the layer. The default is 0.

Return value

1 if a point mode is set; otherwise, 0.

void setSize(vec3 size)

Updates layer size.

Arguments

  • vec3 size - New size of the layer.

vec3 getSize()

Returns the size of the layer.

Return value

Current size of the layer.

int type()

Returns the type of the node.

Return value

World type identifier.
Last update: 2018-06-04
Build: ()