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.

ObjectGuiMesh Class

This class allows to render GUI onto an arbitrary mesh. Unlike ObjectGui, it can be used to create non-flat displays positioned in the world. If the mesh contains several surfaces, the same GUI will be rendered on each of them. Note that the GUI will be rendered according to the UV mapping of surfaces.

The following samples demonstrate the ObjectGuiMesh class usage:

ObjectGuiMesh Class

This class inherits from Object

Members


ObjectGuiMesh (string mesh, string name)

Constructor. Creates a new mesh GUI object with given properties.

Arguments

  • string mesh - Name of the mesh, to which GUI will be added.
  • string name - Path to the folder with GUI skin (the RC file and textures).

float getControlDistance ()

Returns the distance, at which the GUI becomes controllable.

Return value

Distance in units.

Gui getGui ()

Returns a Gui instance associated with the object.

Return value

GUI associated with the object.

string getMeshName ()

Returns the name of the original mesh file.

Return value

Name of the mesh file.

int getMouseShow ()

Returns a value indicating if the mouse cursor is rendered in the mesh GUI object.

Return value

1 if the cursor is rendered; otherwise, 0.

int getScreenHeight ()

Returns the screen height of the mesh GUI object.

Return value

Height in pixels.

int getScreenWidth ()

Returns the screen width of the mesh GUI object.

Return value

Width in pixels.

void setControlDistance (float distance)

Sets a distance, at which the GUI becomes controllable.

Arguments

  • float distance - New distance in units.

void setMouseShow (int show)

Sets a value indicating if the mouse cursor should be rendered in the mesh GUI object. The default is 1.

Arguments

  • int show - Positive number to render the mouse cursor; otherwise, 0.

void setScreenSize (int width, int height)

Sets screen dimensions of the mesh GUI object.

Arguments

  • int width - New width in pixels.
  • int height - New height in pixels.
Last update: 03.07.2017
Build: ()