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::WorldSwitcher Class

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

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

WorldSwitcher Class

Members


static WorldSwitcherPtr create(const Math::vec3 & size)

Creates a switcher for child nodes.

Arguments

  • const Math::vec3 & size - Box dimensions in units.

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

Arguments

  • const Ptr<Node> & node

void setMaxDistance(float distance)

Sets the maximum distance of visibility. If a camera is further from a node than this maximum distance, a node is not visible. The default is inf.

Arguments

  • float distance - Maximum distance of visibility in units.

float getMaxDistance()

Returns the current maximum distance of visibility. If a camera is further from a node than this maximum distance, a node is not visible. The default is inf.

Return value

Maximum distance of visibility in units.

void setMinDistance(float distance)

Sets the minimum distance of visibility. If a camera is closer to a node than this minimum distance, a node is not visible. The default is -inf.

Arguments

  • float distance - Minimum distance of visibility in units.

float getMinDistance()

Returns the current minimum distance of visibility. If a camera is closer to a node than this minimum distance, a node is not visible. The default is -inf.

Return value

Minimum distance of visibility in units.

void setOffset(const Math::vec3 & offset)

Sets offset of coordinates of the switcher box center.

Arguments

  • const Math::vec3 & offset - Offset of coordinates.

Math::vec3 getOffset()

Returns the currnt offset of coordinates of the switcher box center.

Return value

Current offset of coordinates.

void setPoint(int point)

Sets a point mode for the switcher. If the point mode is set, the distance is measured to the bounding box center; otherwise, to the bounding box edges.

Arguments

  • int point - 1 to set the point mode, 0 not to set.

int isPoint()

Returns a value indicating if the point mode is set for the switcher. If the point mode is set, the distance is measured to the bounding box center; otherwise, to the bounding box edges.

Return value

Returns 1 if the point mode is set; otherwise, 0.

void setSize(const Math::vec3 & size)

Sets the size of a switcher.

Arguments

  • const Math::vec3 & size - New switcher size (i.e. box dimensions in units).

Math::vec3 getSize()

Returns the current size of a switcher.

Return value

Current switcher size (i.e. box dimensions in units).

int type()

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