This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility 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.

ObjectGuiMesh Class

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

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

ObjectGuiMesh Class

Members


ObjectGuiMesh (const Ptr<Mesh> & mesh, const char * name = 0)

Arguments

  • const Ptr<Mesh> & mesh
  • const char * name

ObjectGuiMesh (const char * mesh_name, const char * name = 0, int dynamic = 0)

Arguments

  • const char * mesh_name
  • const char * name
  • int dynamic

Ptr<Gui> getGui ()

Returns a Gui instance associated with the object.

Return value

Gui smart pointer.

int getScreenWidth ()

Returns the screen width of the mesh GUI object.

Return value

The width in pixels.

int createMesh (const char * name, int dynamic = 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.

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 loadMesh (const char * name)

Loads a mesh file.

Arguments

  • const char * name - Mesh file name.

Return value

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

int setMesh (const Ptr<Mesh> & mesh)

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

Arguments

  • const Ptr<Mesh> & mesh - Pointer to the source mesh that must be copied.

Return value

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

void setMouseShow (int show)

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.

void setScreenSize (int width, int height)

Sets screen dimensions of the mesh GUI object.

Arguments

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

void setControlDistance (float distance)

Sets a distance at which the GUI becomes controllable.

Arguments

  • float distance - A new distance in units.

void flushMesh ()

Flushes the mesh geometry into the video memory.

const char * getMeshName ()

Returns the mesh name.

Return value

Mesh name.

void setMeshName (const char * name)

Sets a new mesh name.

Arguments

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

int saveMesh (const char * name)

Saves the mesh into a file.

Arguments

  • const char * name - Mesh file name.

Return value

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

float getControlDistance ()

Returns the distance at which the GUI becomes controllable.

Return value

The distance in units.

int getScreenHeight ()

Returns the screen height of the mesh GUI object.

Return value

The height in pixels.

int getMesh (const Ptr<Mesh> & mesh)

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

Arguments

  • const Ptr<Mesh> & mesh - Pointer to the source mesh.

Return value

1 if the mesh is copied successfully; otherwise, 0.
Last update: 2017-07-03
Build: ()