This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
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
CIGI Client Plugin
Rendering-Related Classes
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.WorldSwitcher Class

Inherits:Node

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

WorldSwitcher Class

Members


static WorldSwitcher(vec3 size)

Creates a switcher for child nodes.

Arguments

  • vec3 size - Box dimensions in units.

WorldSwitcher cast(Node node)

Casts a WorldSwitcher out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

WorldSwitcher instance.

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(vec3 offset)

Sets offset of coordinates of the switcher box center.

Arguments

  • vec3 offset - Switcher box center coordinates.

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 measure the distance to the box center; 0 to measure it to the box edges.

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(vec3 size)

Sets the size of a switcher.

Arguments

  • vec3 size - Box dimensions in units.

vec3 getSize()

Returns the current size of a switcher.

Return value

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

int type()

Returns the type of the node.

Return value

World type identifier.
Last update: 2018-08-10
Build: ()