This page has been translated automatically.
Setting Up Development Environment
High-Level Systems
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
Double Precision Coordinates
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related 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.

Unigine::Utils Class

Header:#include <UnigineUtils.h>

This class contains the helper functions.

Utils Class


int convertHeightsToNormals(ImagePtr & out, const ImagePtr & heights, float step_size)

Converts the elevation (height) map to the normal map.


  • ImagePtr & out - Pointer to the target normal map.
  • const ImagePtr & heights - Source elevation (height) map.
  • float step_size - Grid cell step.

Return value

1 if the converting was successful; otherwise, 0.

void convertNodesToMesh(MeshPtr & out, const Vector<NodePtr> & nodes)

Creates a mesh out of the node array.


  • MeshPtr & out - Pointer to the target mesh.
  • const Vector<NodePtr> & nodes - Array of the node pointers.

NodePtr loadObjectMesh(const char * name)

Loads a mesh from a file. If the mesh is loaded successfully, its node does not belong to any node hierarchy, so be careful and make sure to handle it properly, when it is no longer needed.


  • const char * name - Path to the mesh.

Return value

Pointer to the node corresponding to the loaded mesh; 0 if the mesh cannot be loaded.
Last update: 2017-07-03
Build: ()