This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
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

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

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

Unigine::WorldLayer Class

Members


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