This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
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::Engine Class

Header:#include <UnigineEngine.h>

The Engine class is required for the engine initialization and executing the main loop of the program. Also, you can get the engine startup options through this class.

Engine Class

Members


static Engine * get()

Returns a pointer to the existing engine instance.

Return value

Pointer to the existing engine.

const char * getAppPath()

Returns the path to a directory where binary executable file is stored.

Return value

Path to a directory where binary executable file is stored.

const char * getArg(int num)

Returns a command line argument by its index.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

virtual float getArgf(int num) const =0

Returns a command line argument by its index converted to a floating point value.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

virtual int getArgi(int num) const =0

Returns a command line argument by its index converted to an integer value.

Arguments

  • int num - Index of the command line argument.

Return value

Command line argument.

const char * getCachePath()

Returns a path to a directory where cached files will be stored.

Return value

Path to the directory with cached files.

const char * getDataPath(int num = 0)

Returns a path to the -data_path directory specified at the engine startup.

Arguments

  • int num - Number of the specified -data_pathdirectory. For example, if the are three directories, their numbers will be 1, 2 and 3.

Return value

Path to the data directory.

virtual int isDone() const =0

Returns the done flag on engine quit.

Return value

1 if engine is quitting; otherwise, 0.

const char * getEditorCache()

Returns a path to the editor script cache file.

Return value

Path to the editor script cache.

int getEditorFunction(const char * name, int num_args)

Returns the editor function identifier.

Arguments

  • const char * name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

The editor script function identifier.

int isEditorFunction(const char * name, int num_args)

Returns a value indicating if the editor script function exists.

Arguments

  • const char * name - Name of the editor script function.
  • int num_args - Number of editor script function arguments.

Return value

1 if the editor script function exists; otherwise, 0.

virtual void * getEditorInterpreter() const =0

Returns a pointer to the editor interpreter.

Return value

Pointer to the editor interpreter.

virtual int isEditorInterpreter() const =0

Returns a value indicating if the function is called from the editor script.

Return value

1 if the function is called from the editor script; otherwise, 0.

virtual int isEditorLoaded() const =0

Returns a value indicating if the editor script is loaded.

Return value

1 if the editor script is loaded; otherwise, 0.

EditorLogic * getEditorLogic(int num)

Returns the registered EditorLogic instance by its number.

Arguments

  • int num - Number of the EditorLogic instance.

Return value

EditorLogic instance.

const char * getEditorScript()

Returns a path to the editor script (provided by the -editor_script command line argument).

Return value

Path to the editor script.

void setEditorVariable(const char * name, const Variable & v)

Sets the editor script variable by its name.

Arguments

  • const char * name - Name of the editor script variable.
  • const Variable & v - Value of the editor script variable.

const Variable & getEditorVariable(const char * name)

Returns the editor script variable by its name.

Arguments

  • const char * name - Name of the world script variable.

Return value

Value of the editor script variable.

int isEditorVariable(const char * name)

Returns a value indicating if the editor script variable exists.

Arguments

  • const char * name - Name of the editor script variable.

Return value

1 if the editor script variable exists; otherwise, 0.

String getError()

Returns the system error message.

Return value

The system error message of the current frame, if there is one; otherwise an empty string.

const char * getExternDefines()

Returns the external definitions specified on the application start-up.

Return value

The list of external definitions.

const char * getHomePath()

Returns a path to the user's home directory.

Return value

Path to the user's home directory.

static int isInitialized()

Returns the initialization status of the engine.

Return value

1 if the engine is initialized; otherwise, 0.

float getInterfaceTime()

Returns the total accumulative time spent on rendering GUI widgets.

Return value

Time value, in milliseconds.

int isMainThread()

Checks if the current thread is main.

Return value

1 if the current thread is main; otherwise, 0.

String getMessage()

Returns the last system message of the current frame, or empty string if there are no messages.

Return value

The last system message.

virtual int getNumArgs() const =0

Returns the number of command line arguments.

Return value

Number of command line arguments.

int getNumDataPaths()

Returns the number of the specified -data_pathdirectories.

Return value

Number of data directories.

int getNumEditorLogics()

Returns the number of registered EditorLogic instances.

Return value

Number of EditorLogic instances.

int getNumPluginPaths()

Returns the number of paths to directories with plugins specified via -plugin_pathcommand-line option.

Return value

Number of the specifed paths to directories with plugins.

int getNumPlugins()

Returns the number of loaded plugins.

Return value

Number of plugins.

int getNumSystemLogics()

Returns the number of registered SystemLogic instances.

Return value

Number of SystemLogic instances.

int getNumWorldLogics()

Returns the number of registered WorldLogic instances.

Return value

Number of WorldLogic instances.

virtual void * getPluginData(int num) const =0

Returns the loaded plugin data.

Arguments

  • int num - Index of the loaded plugin.

Return value

Data of the loaded plugin, if it exists; otherwise, 0.

virtual Plugin * getPluginInterface(int num) const =0

Returns the loaded plugin interface.

Arguments

  • int num - Index of the loaded plugin.

Return value

Interface of the loaded plugin, if it exists; otherwise, 0.

const char * getPluginName(int num)

Returns the name of the loaded plugin by its index.

Arguments

  • int num - Index of the loaded plugin.

Return value

Loaded plugin name.

const char * getPluginPath(int num)

Returns a path to a plugin directory specified via -plugin_path.

Arguments

  • int num - Plugin path number in the row of the specified plugin paths.

Return value

Path to a plugin directory.

float getPresentTime()

Returns the total time spent on waiting for the GPU after all calculations on the CPU are completed. See the Profiler article for details.

Return value

Time value, in milliseconds.

float getRenderTime()

Returns the time value, required to prepare all data to be rendered in the current frame and feed rendering commands from the CPU to the GPU. See the Profiler article for details.

Return value

Rendering time value, milliseconds.

const char * getSavePath()

Returns a path to a directory where a default configuration file, saved files and screenshots will be stored.

Return value

Path to a directory with the default configuration file, saved files, etc.

const char * getSoundApp()

Returns the current sound API.

Return value

A sound API instance.

const char * getSystemCache()

Returns a path to the system script cache.

Return value

Path to the system script cache.

int getSystemFunction(const char * name, int num_args)

Returns the system function identifier.

Arguments

  • const char * name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

System script function identifier.

int isSystemFunction(const char * name, int num_args)

Checks whether the system script function exists.

Arguments

  • const char * name - Name of the system script function.
  • int num_args - Number of system script function arguments.

Return value

1 if the system script function exists; otherwise, 0.

virtual void * getSystemInterpreter() const =0

Returns a pointer to the system interpreter.

Return value

Pointer to the system interpreter.

virtual int isSystemInterpreter() const =0

Checks if the function is called from the system script.

Return value

1 when the function is called from the system script; otherwise, 0.

SystemLogic * getSystemLogic(int num)

Returns the registered SystemLogic instance by the given number.

Arguments

  • int num - Number of the SystemLogic instance.

Return value

SystemLogic instance.

const char * getSystemScript()

Returns a path to the system script.

Return value

Path to the system script.

void setSystemVariable(const char * name, const Variable & v)

Sets a system script variable by a name.

Arguments

  • const char * name - Name of the system script variable.
  • const Variable & v - Value of the system script variable.

const Variable & getSystemVariable(const char * name)

Returns the system script variable by its name.

Arguments

  • const char * name - Name of the system script variable.

Return value

System script variable.

int isSystemVariable(const char * name)

Checks whether a system script variable exists.

Arguments

  • const char * name - Name of the system script variable.

Return value

1 if the system script variable exists; otherwise, 0.

float getTotalTime()

Returns the total time that both rendering and calculating of the frame took (the duration of the main loop in the application execution sequence).

Return value

Total time value, milliseconds.

float getUpdateTime()

Returns the duration of the update phase, during which the objects are prepared for their collision response to be calculated.

Return value

The update phase duration value, milliseconds.

const char * getVideoApp()

Returns a graphics API used for rendering.

Return value

Graphics API used for rendering.

const char * getVideoApp()

Returns a graphics API used for rendering.

Return value

Graphics API used for rendering.

int getWorldFunction(const char * name, int num_args)

Returns the world script function identifier.

Arguments

  • const char * name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

World script function identifier.

int isWorldFunction(const char * name, int num_args)

Returns value indicating if the world script function exists.

Arguments

  • const char * name - Name of the world script function.
  • int num_args - Number of world script function arguments.

Return value

1 if the world script function exists; otherwise, 0.

virtual void * getWorldInterpreter() const =0

Returns a pointer to the world interpreter.

Return value

Pointer to the world interpreter.

virtual int isWorldInterpreter() const =0

Returns a value indicating if the function is called from the world script.

Return value

1 if the function is called from the world script; otherwise, 0.

virtual int isWorldLoaded() const =0

Returns a value indicating if the world script is loaded.

Return value

1 if the world script is loaded; otherwise, 0.

WorldLogic * getWorldLogic(int num)

Returns the registered WorldLogic instance by its number.

Arguments

  • int num - Number of the WorldLogic instance.

Return value

WorldLogic instance.

void setWorldVariable(const char * name, const Variable & v)

Sets a world script variable by its name.

Arguments

  • const char * name - Name of the world script variable.
  • const Variable & v - Value of the world script variable.

const Variable & getWorldVariable(const char * name)

Returns a world script variable by its name.

Arguments

  • const char * name - Name of the world script variable.

Return value

World script variable.

int isWorldVariable(const char * name)

Returns a value indicating if the world script variable exists.

Arguments

  • const char * name - Name of the world script variable.

Return value

1 if the world script variable exists; otherwise, 0.

int addEditorLogic(EditorLogic * logic)

Adds an EditorLogic instance to the engine runtime.

Arguments

Return value

1 if the EditorLogic instance has been added successfuly; otherwise, 0.

virtual int addPlugin(Plugin * plugin) const =0

Adds a plugin in engine runtime by using a pointer to this plugin.

Arguments

  • Plugin * plugin - Plugin pointer.

Return value

1 if the plugin ha been added successfully; otherwise, 0.

int addPlugin(const char * name)

Adds a plugin in engine runtime by its name.

Arguments

  • const char * name - Plugin name.

Return value

1 if the plugin has been added successfully; otherwise, 0.

int addSystemLogic(SystemLogic * logic)

Adds an SystemLogic instance to the engine runtime.

Arguments

Return value

1 if the SystemLogic instance has been added successfully; otherwise, 0.

int addWorldLogic(WorldLogic * logic)

Adds an WorldLogic instance to the engine runtime.

Arguments

Return value

1 if the WorldLogic instance has been added successfully; otherwise, 0.

void dialogError(const char * title)

Displays a dialog window with errors set using the error() function.

Arguments

  • const char * title - Title to be displayed in the error window.

void dialogMessage(const char * title)

Displays a dialog window with the last message set using the message() function.

Arguments

  • const char * title - Title to be displayed in the message window.

int findPlugin(const char * name)

Searches the index of the loaded plugin by its name.

Arguments

  • const char * name - Name of the plugin.

Return value

Index of the plugin.

Engine * init(int version, int argc, char ** argv, const char * project, const char * password)

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • int argc - Number of command line arguments.
  • char ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init(int version, App * app, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0)

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of values of command line arguments (a wide-character string).
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init(int version, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0)

Initializes a new engine instance.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of command line arguments values.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init(int version, App * app, int argc, char ** argv, const char * project = 0, const char * password = 0)

Initializes a new engine instance to be used with an external graphics application.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class.
  • int argc - Number of command line arguments.
  • char ** argv - Array of values of command line arguments.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init(int version, App * app, const char * app_path, const char * home_path, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0)

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • wchar_t ** argv - Array of values of command line arguments (a wide-character string).
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

Engine * init(int version, App * app, const char * app_path, const char * home_path, int argc, char ** argv, const char * project = 0, const char * password = 0)

Initializes a new engine instance to be used with an external graphics application, which is stored at the specified path.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class.
  • const char * app_path - Path to a directory where binary executable file is stored. Pass the 0 value to ignore this parameter.
  • const char * home_path - Path to the user's home directory.
  • int argc - Number of command line arguments.
  • char ** argv - Array of values of command line arguments.
  • const char * project - Project name. If this parameter is set, it forces the engine to store rewritable data (such as log file, cache files, config files) in user profile rather than in a directory with binaries. Notice that only the project name is required to pass in for this parameter, not the full path to the project. If there is no need to change location of such files, pass the 0 value.
  • const char * password - Password for the filesystem archives. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password. Notice that the specified password must be the same as for the project archive (if it exists). Pass the 0 value if you do not need to set a password.

Return value

Pointer to the new engine instance.

void main(SystemLogic * system, WorldLogic * world, EditorLogic * editor)

Engine main loop. Replaces the following commands:
Source code (C++)
while (isDone() == 0) { 
	update();  
	render(); 
	swap(); 
}

Arguments

int removeEditorLogic(EditorLogic * logic)

Removes an EditorLogic instance from engine runtime.

Arguments

Return value

1 if the instance has been removed successfuly; otherwise, 0.

virtual int removePlugin(Plugin * plugin) const =0

Removes a plugin by using a pointer to this plugin.

Arguments

  • Plugin * plugin - Plugin pointer to remove.

Return value

1 if the plugin has been removed successfully; otherwise, 0.

int removeSystemLogic(SystemLogic * logic)

Removes a SystemLogic instance from engine runtime.

Arguments

Return value

1 if the instance has been removed successfuly; otherwise, 0.

int removeWorldLogic(WorldLogic * logic)

Removes a WorldLogic instance from engine runtime.

Arguments

Return value

1 if the instance has been removed successfully; otherwise, 0.

virtual void render() const =0

Engine rendering function. This function must be called every frame.

virtual const Variable & runEditorFunction(const Variable & name) const =0

Runs the editor script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the editor script function.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0)

Runs the editor script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1)

Runs the editor script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2)

Runs the editor script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3)

Runs the editor script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4)

Runs the editor script function by its name. The target function must receive 5 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5)

Runs the editor script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6)

Runs the editor script function by its name. The target function must receive 7 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

Editor script function return value.

const Variable & runEditorFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7)

Runs the editor script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

Editor script function return value.

virtual const Variable & runEditorFunction(const Variable & name, const Variable * args, int num_args) const =0

Runs the editor script function by its name.

Arguments

  • const Variable & name - Name of the editor script function.
  • const Variable * args - Pointer to editor script function arguments.
  • int num_args - Number of editor script function arguments.

Return value

Editor script function return value.

virtual const Variable & runSystemFunction(const Variable & name) const =0

Runs the system script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the system script function.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0)

Runs the system script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1)

Runs the system script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2)

Runs the system script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3)

Runs the system script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4)

Runs the system script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5)

Runs the system script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6)

Runs the system script function by its name. The target function must receive 7 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

System script function return value.

const Variable & runSystemFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7)

Runs the system script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

System script function return value.

virtual const Variable & runSystemFunction(const Variable & name, const Variable * args, int num_args) const =0

Runs system script function by its name.

Arguments

  • const Variable & name - Name of the system script function.
  • const Variable * args - Pointer to system script function arguments.
  • int num_args - Number of system script function arguments.

Return value

System script function return value.

virtual const Variable & runWorldFunction(const Variable & name) const =0

Runs the world script function by its name. The target function can receive up to 8 arguments.

Arguments

  • const Variable & name - Name of the world script function.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0)

Runs the world script function by its name. The target function must receive 1 argument.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1)

Runs the world script function by its name. The target function must receive 2 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2)

Runs the world script function by its name. The target function must receive 3 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3)

Runs the world script function by its name. The target function must receive 4 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4)

Runs the world script function by its name. The target function must receive 5 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5)

Runs the world script function by its name. The target function must receive 6 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6)

Runs the world script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.

Return value

World script function return value.

const Variable & runWorldFunction(const Variable & name, const Variable & a0, const Variable & a1, const Variable & a2, const Variable & a3, const Variable & a4, const Variable & a5, const Variable & a6, const Variable & a7)

Runs the world script function by its name. The target function must receive 8 arguments.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable & a0 - First argument.
  • const Variable & a1 - Second argument.
  • const Variable & a2 - Third argument.
  • const Variable & a3 - Fourth argument.
  • const Variable & a4 - Fifth argument.
  • const Variable & a5 - Sixth argument.
  • const Variable & a6 - Seventh argument.
  • const Variable & a7 - Eighth argument.

Return value

World script function return value.

virtual const Variable & runWorldFunction(const Variable & name, const Variable * args, int num_args) const =0

Runs the world script function by its name.

Arguments

  • const Variable & name - Name of the world script function.
  • const Variable * args - Pointer to world script function arguments.
  • int num_args - Number of world script function arguments.

Return value

World script function return value.

static void shutdown()

Deletes the pointer to the existing engine instance.

virtual void swap() const =0

Engine swap buffers function. This function must be called every frame.

virtual void update() const =0

Engine update function. This function must be called every frame.
Last update: 2018-04-26
Build: ()