Integration of Engee with UNIGINE
Two classes are implemented for integration: EngeeServerSocket
and EngeeClientSocket
. These are network sockets designed to exchange data with blocks of the Hardware UNIGINE partition in the Engee system. To use these classes, you need to add their sources to the CMakeLists.txt
file similar to the example in the UNIGINE integration directory.
Project configuration
An application without a template is used.
Development environment: C++ and CMake build system.
In this configuration, all world logic (including object behaviour) is implemented in the AppWorldLogic
class. The AppEditorLogic
and AppSystemLogic
classes are not used in this integration.
Integration example
The Socket
directory contains the source files of the new classes, as well as the definition of the data transfer protocol (common_types.h
).
The world initialisation method adds:
-
Creating an instance of
EngeeClientSocket
that connects to address127.0.0.1
and port5150
; -
Obtaining an object (node) by name, such as
material_ball
.
In the world update method (calculation of each frame):
-
Data from the Engee socket is received;
-
The position of the object is updated: the coordinates received from the socket are added to the current position.
When closing the world, the method of closing the socket is called.