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

Interface for object gui mesh handling. See also the UnigineScript analog.

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

Unigine::ObjectGuiMesh Class

Members


static int type ()

ObjectGuiMesh type.

Return value

ObjectGuiMesh type identifier.

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

An ObjectGuiMesh constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< ObjectGuiMesh > create (const ObjectPtr & object)

An ObjectGuiMesh constructor.

Arguments

  • const ObjectPtr & object - Object smart pointer.

static Ptr< ObjectGuiMesh > create (const MeshPtr & mesh, const char * name)

An ObjectGuiMesh constructor. The ObjectGuiMesh will be created on the basis of the specified mesh.

Arguments

  • const MeshPtr & mesh - The source mesh.
  • const char * name - Name of the new GUI mesh.

static Ptr< ObjectGuiMesh > create (const char * mesh_name, const char * name, int dynamic)

An ObjectGuiMesh constructor. The ObjectGuiMesh will be created on the basis of the specified mesh.

Arguments

  • const char * mesh_name - The path to the *.mesh file.
  • const char * name - Name of the new GUI mesh.
  • int dynamic - Dynamic flag:
    • 0 - If the mesh vertices are changed in run-time, meshes loaded from the same file will be also changed.
    • 1 - If the mesh vertices are changed in run-time, meshes loaded from the same file won't be changed.

virtual GuiPtr getGui () const =0

Returns a Gui instance associated with the object.

Return value

Gui smart pointer.

virtual int createMesh (const char * name, int dynamic) const =0

Creates a mesh.

Arguments

  • const char * name - Path to the mesh file.
  • int dynamic - Dynamic flag:
    • 0 - If the mesh vertices are changed in run-time, meshes loaded from the same file will be also changed.
    • 1 - If the mesh vertices are changed in run-time, meshes loaded from the same file won't be changed.

Return value

1 if the mesh is created successfully; otherwise, 0.

virtual int loadMesh (const char * name) const =0

Loads a mesh file.

Arguments

  • const char * name - Mesh file name.

Return value

1 if the mesh is loaded successfully; otherwise, 0.

virtual int saveMesh (const char * name) const =0

Saves the mesh into a file.

Arguments

  • const char * name - Mesh file name.

Return value

1 if the mesh is saved successfully; otherwise, 0.

virtual int setMesh (const MeshPtr & mesh) const =0

Sets a mesh. The mesh passed as the argument will be copied to the current mesh.

Arguments

  • const MeshPtr & mesh - Pointer to the source mesh that must be copied.

Return value

1 if the mesh is copied successfully; otherwise, 0.

virtual int getMesh (const MeshPtr & mesh) const =0

Returns a mesh. The current mesh will be copied to the source mesh passed as the argument.

Arguments

  • const MeshPtr & mesh - Pointer to the source mesh.

Return value

1 if the mesh is copied successfully; otherwise, 0.

virtual void flushMesh () const =0

Flushes the mesh geometry into the video memory.

virtual void setMeshName (const char * name) const =0

Sets a new mesh name.

Arguments

  • const char * name - Name to be set for the mesh.

virtual const char * getMeshName () const =0

Returns the mesh name.

Return value

Mesh name.

virtual void setMouseShow (int show) const =0

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

Arguments

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

virtual int getMouseShow () const =0

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.

virtual void setControlDistance (float distance) const =0

Sets a distance at which the GUI becomes controllable.

Arguments

  • float distance - A new distance in units.

virtual float getControlDistance () const =0

Returns the distance at which the GUI becomes controllable.

Return value

The distance in units.

virtual void setScreenSize (int width, int height) const =0

Sets screen dimensions of the mesh GUI object.

Arguments

  • int width - A new width in pixels.
  • int height - A new height in pixels.

virtual int getScreenWidth () const =0

Returns the screen width of the mesh GUI object.

Return value

The width in pixels.

virtual int getScreenHeight () const =0

Returns the screen height of the mesh GUI object.

Return value

The height in pixels.
Last update: 2017-07-03
Build: ()