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

WorldSector Class

Creates a box-shaped sector. When the player is inside of it, everything outside its volume is culled. If a surface is even partly outside the sector, it is culled as well.

WorldSector Class

This class inherits from Node

Members


WorldSector (vec3 dimensions)

Constructor. Creates a new world sector with given dimensions.

Arguments

  • vec3 dimensions - Dimensions of the new world sector. If negative values are provided, 0 will be used instead of them.

Node getNode (int id)

Returns a specified node contained in the world sector.

Arguments

  • int id - 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 contained in the world sector.

Return value

Number of nodes.

int getNumWorldPortals ()

Returns the number of world portals adjacent to the world sector.

Return value

Number of portals.

vec3 getSize ()

Returns the current dimensions of the world sector.

Return value

Current dimensions.

WorldPortal getWorldPortal (int id)

Returns a specified world portal adjacent to the world sector.

Arguments

  • int id - Number of the portal in range from 0 to the total number of portals.

Return value

Specified portal.

void setSize (vec3 dimensions)

Updates the current dimensions of the world sector.

Arguments

  • vec3 dimensions - Dimensions of the world sector. If negative values are provided, 0 will be used instead of them.
Last update: 2017-07-03
Build: ()