3es
0.7
|
3rd Eye Scene is at its core a client/server application. A 3es server may be embedded into any application which needs to expose 3D data and cannot easily otherwise do so. A 3es client application can connect to a 3es server to either view or record (or both) the data exposed by the server code.
The 3rd Eye Scene code base of three key components:
The C# and C++ code each implement the same core components to support the 3rd Eye Scene client/server module. This includes message structures to support the 3es protocol, network transport and connection management and core shape definitions and utilities. The C# code also includes a command line recording client application and a library to bridge between the core C# code and Unity. This library also supports the plugin extension model. Finally, the Unity code provides a client viewer application for viewing 3es connections and recorded files.
The C# library organisation is illustrated below.
The core library provides classes to support writing a 3rd Eye Scene client and server applications. It includes:
This library is required by both client and server applications.
An application can support a 3es server and remotely render data to a connected client by the following steps:
Note that the C# is slightly more difficult integrate and maintain than the C++ use case. Where the C++ server commands can easily be compiled out through the use of the C++ preprocessor, C# code must be more explicitly guarded and removed due to the limitations of the C# preprocessor.
The 3esRuntime library is a small extension to the 3esCore library to support bridging between pure C# code and the Unity viewer client. It serves to:
While this code could be wrapped up into the Unity project, it has been externalised to better support 3es plugins. A 3es plugin library can be authored to support custom routing ID through custom MessageHandler
classes. Such a library can then be dropped into a pre-built version of the 3rd Eye Scene viewer.
Note: The C# runtime is deliberately written without exception handling. Raising exceptions would represent a more canonical C# way of reporting errors, however, exception handling always imposes a performance penalty. As such it was decided that message handlers should report errors via return values for logging without imposing a significant performance penalty to the client.
3esrec is a simple 3rd Eye Scene client console application for recording 3es server sessions. General usage is:
3esrec also illustrates the simplest type of 3es client application.
The C++ library organisation is much simpler than the C# libraries as the C++ code does not include a 3es client application. It is intended to supporting 3es server based and embedding 3es commands into such C++ applications.
Note: The C++ server code represents the "leading" server platform, while the C# code represents the "leading" client application.
The C++ 3es-core libary supports a set of features similar to the C# 3esCore library:
This library is required by server applications and could be used to support a C++ client application.
The general use case is for a C++ server application to use only the 3rd Eye Scene macros. These can easily be compiled out, removing 3es debugging and associated overhead from the program.