This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
Content Optimization
Materials
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

EnginePtr Class

Header: #include <UnigineEngine.h>

This class is an analogue of the C++ std::auto_ptr class template. It automatically destroys the engine instance when the function is destroyed.

Source code (C++)
Unigine::EnginePtr engine(...);
engine->main();

EnginePtr Class

Members


EnginePtr ( ) #

An EnginePtr constructor.

EnginePtr ( const EnginePtr & ptr ) #

An EnginePtr constructor.

Arguments

  • const EnginePtr & ptr - Pointer to the EnginePtr instance.

EnginePtr ( int version, int argc, char ** argv, const char * project = 0, const char * password = 0 ) #

An EnginePtr constructor.

Arguments

  • int version - Engine 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.

EnginePtr ( int version, int argc, wchar_t ** argv, const char * project = 0, const char * password = 0 ) #

An EnginePtr constructor.

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.

EnginePtr ( int version, App * app, int argc, char ** argv, const char * project, const char * password ) #

An EnginePtr constructor.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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.

EnginePtr ( int version, App * app, int argc, wchar_t ** argv, const char * project, const char * password ) #

An EnginePtr constructor.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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.

EnginePtr ( int version, App * app, const char * app_path, const char * home_path, int argc, char ** argv, const char * project, const char * password ) #

An EnginePtr constructor.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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 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.

EnginePtr ( int version, App * app, const char * app_path, const char * home_path, int argc, wchar_t ** argv, const char * project, const char * password ) #

An EnginePtr constructor.

Arguments

  • int version - Engine version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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 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.

Engine * get ( ) #

Returns a pointer to the existing Engine instance.

Return value

Pointer to Engine.

int isOwner ( ) #

Returns the owner flag of the pointer. If the pointer is the owner, on its deletion the object also will be deleted.

Return value

Owner flag.

void grab ( ) #

Sets the owner flag to 1 for the Engine pointer.

void 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 EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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.

void init ( int version, int argc, char ** argv, const char * project = 0, const char * password = 0 ) #

Initializes a new EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • 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.

void 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 EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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.
  • 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.

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

Initializes a new EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • int argc - Number of command line arguments.
  • wchar_t ** 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.

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

Initializes a new EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • int argc - Number of command line arguments.
  • wchar_t ** 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.

void init ( ) #

Initializes the pointer to a new engine instance.

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

Initializes a new EnginePtr instance.

Arguments

  • int version - Version number (UNIGINE_VERSION).
  • App * app - Pointer to the graphics App class. Pass the 0 value to ignore this parameter.
  • 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.

Engine * operator-> ( ) #

Pointer dereferencing and member access operator.

Return value

Engine instance.

EnginePtr & operator= ( const EnginePtr & ptr ) #

Assign operator.

Arguments

  • const EnginePtr & ptr - EnginePtr instance.

Return value

EnginePtr instance.

void release ( ) #

Releases the owner flag for the pointer. Engine instance will stay alive upon the pointer destruction.

void shutdown ( ) #

Destroys the existing engine instance. The pointer must be an owner of the engine instance.
Last update: 2021-04-29
Build: ()