This page has been translated automatically.
Programming
Fundamentals
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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WorldSector Class

Header:#include <UnigineWorlds.h>
Inherits:Node

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

Members


static WorldSectorPtr create(const Math::vec3 & dimensions)

Constructor. Creates a new world sector with given dimensions.

Arguments

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

Ptr<WorldSector> cast(const Ptr<Node> & node)

Arguments

  • const Ptr<Node> & node

Ptr<Node> getNode(int id)

Returns a node pointer.

Arguments

  • int id - 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.

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.

void setSize(const Math::vec3 & size)

Updates the current dimensions of the world sector. The minimum value is vec3(0,0,0).

Arguments

  • const Math::vec3 & size - Dimensions of the world sector.

Math::vec3 getSize()

Returns the current dimensions of the world sector. The minimum value is vec3(0,0,0).

Return value

Current dimensions.

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

int type()

Last update: 2017-07-03
Build: ()