WorldLayer Class
This class describes how to create and modify world layers.
WorldLayer Class
This class inherits from NodeMembers
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.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.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
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)