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
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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 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: ()