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
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1

Unigine::WorldLayer Class

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

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

Unigine::WorldLayer Class

Members


static int type ()

WorldLayer type.

Return value

WorldLayer type identifier.

static Ptr< WorldLayer > create (const NodePtr & node)

WorldLayer constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< WorldLayer > create (const vec3 & size, const char * name)

WorldLayer constructor.

Arguments

  • const vec3 & size - World layer size.
  • const char * name - Path to a *.node file.

virtual Ptr< Node > getNode () const =0

Returns a node pointer.

Return value

Node pointer.

virtual void setPoint (int point) const =0

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.

virtual int isPoint () const =0

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.

virtual void setSize (const vec3 & size) const =0

Updates layer size.

Arguments

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

virtual vec3 getSize () const =0

Returns the size of the layer.

Return value

Current size of the layer.

virtual void setOffset (const vec3 & size) const =0

Sets offset of coordinates of the layer box center.

Arguments

  • const vec3 & size - Offset of layer box center.

virtual vec3 getOffset () const =0

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

Return value

Current offset of layer box center.

virtual void setLoadDistance (float distance) const =0

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.

virtual float getLoadDistance () const =0

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.

virtual void setClearDistance (float distance) const =0

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.

virtual float getClearDistance () const =0

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.

virtual void setNodeName (const char * name) const =0

Sets a path to a node.

Arguments

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

virtual const char * getNodeName () const =0

Returns the path to the node.

Return value

Path to the *.node file.

virtual void setNodeGroup (int group) const =0

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.

virtual int getNodeGroup () const =0

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

Return value

Priority group value.

virtual void setNodeWeight (float group) const =0

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 group - New priority weight value.

virtual float getNodeWeight () const =0

Returns the current priority weight value.

Return value

Current priority weight value.

virtual int getNumNodes () const =0

Returns the number of nodes contained in the world layer.

Return value

Number of nodes.

virtual NodePtr getNode (int num) const =0

Returns a specified node contained in the world layer.

Arguments

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

Return value

Specified node.
Last update: 2017-07-03