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.

Unigine::WorldSwitcher Class

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

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

Unigine::WorldSwitcher Class

Members


static int type ()

WorldSwitcher type.

Return value

WorldSwitcher type identifier.

static Ptr< WorldSwitcher > create (const NodePtr & node)

WorldSwitcher constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< WorldSwitcher > create (const vec3 & size)

WorldSwitcher constructor.

Arguments

  • const vec3 & size - World switcher size.

virtual void setPoint (int point) const =0

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.

virtual int isPoint () const =0

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.

virtual void setSize (const vec3 & size) const =0

Sets the size of a switcher.

Arguments

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

virtual vec3 getSize () const =0

Returns the current size of a switcher.

Return value

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

virtual void setOffset (const vec3 & size) const =0

Sets offset of coordinates of the switcher box center.

Arguments

  • const vec3 & size - Offset of coordinates.

virtual vec3 getOffset () const =0

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

Return value

Current offset of coordinates.

virtual void setMinDistance (float distance) const =0

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.

virtual float getMinDistance () const =0

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.

virtual void setMaxDistance (float distance) const =0

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.

virtual float getMaxDistance () const =0

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