Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes

WorldLayer Class

Interface for world layer handling. See also the UnigineScript analog.

To use this class, include the UnigineWorldLayer.h file.

WorldLayer Class

Members


WorldLayer (const Math::vec3 & size, const char * name)

Constructor. Creates a new layer with the specified parameters.

Arguments

  • const Math::vec3 & size - Size of the new layer.
  • const char * name - Name of the new layer.

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

Ptr<Node> getNode ()

Returns a node pointer.

Return value

Node pointer.

float getNodeWeight ()

Returns the current priority weight value.

Return value

Current priority weight value.

void setOffset (const Math::vec3 & offset)

Sets offset of coordinates of the layer box center.

Arguments

  • const Math::vec3 & offset - Offset of layer box center.

Math::vec3 getOffset ()

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

Return value

Current offset of layer box center.

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 - Loading distance in units.

void setNodeName (const char * name)

Sets a path to a node.

Arguments

  • const char * name - Path to a *.node file.

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.

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 - New clearing distance in units.

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 set a point mode, 0 not to set. The default is 0.

Math::vec3 getSize ()

Returns the size of the layer.

Return value

Current size of the layer.

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 (const Math::vec3 & size)

Updates layer size.

Arguments

  • const Math::vec3 & size - New size of the layer. The minimum value is vec3(0,0,0).

int getNodeGroup ()

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

Return value

Priority group value.

const char * 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 priority weight value.

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.

int getNumNodes ()

Returns the number of nodes contained in the world layer.

Return value

Number of nodes.

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.
Last update: 2017-07-03