Download Development of an Eye-Tracked 3D/ Stereoscopic Interactive and

Transcript
Chapter 3 – Software Architecture and Development Framework
class ExampleClass extends GameInfo DLLBind(ExampleDLL);
By binding to a DLL file, an UnrealScript class can call the declared in that DLL file
methods or functions, which are written in C/C++. This proves to be an easy and efficient way
to implement functions that either UDK does not support at all, like I/O operations, or it would
slow down the application, due to the fact that UnrealScript is slow.
A function residing inside the DLL must be declared in the UnrealScript class file and
then it can be called exactly like it would be if it was an original UnrealScript function.
Following the previous example and assuming that the ExampleDLL contained a function called
ExampleDLLFunction, the code inside the UnrealScript class would be:
dllimport final function ExampleDLLFunction(); //function declaration
…
ExampleDLLFunction(); //function call
3.1.4 Input Manager
The input manager is responsible to handle the communication between the input
hardware, such as keyboard, mouse, joystick or button boxes and the application. The input
manager examines a configuration file based on DefaultInput.ini and according to it binds each
input action, such as joystick/mouse movement or key press to a specific method designated
to perform the selected action. The Unreal Editor comes with a default configuration file with
some predefined bindings between buttons and methods, but this file can be altered to match
the needs.
In order to create a new binding between a button press and the performed action, or
to change an already defined binding, this change must be reflected in the configuration file.
Also, the method defined in the configuration file must exist in the UnrealScript code of the
new application being developed.
For the purposes of the experiment the default input settings in the configuration file
DefaultInput.ini didn’t need any variations.
3.1.5 Lighting and Rendering Engine
The Unreal Development Kit comes along with Gemini, a flexible and highly optimized
multi-threaded rendering system, which creates a lush visual reality and provides the power
necessary for photorealistic simulations. UDK features a 64-bit color HDR rendering pipeline.
The gamma-corrected, linear color space renderer provides for immaculate color precision
while supporting a wide range of post-processing effects such as motion blur, depth of field,
bloom, ambient occlusion and user-defined materials.
UDK supports all modern per-pixel lighting and rendering techniques, including normal
mapped, parameterized Phong lighting, custom user-controlled per material lighting models
including anisotropic effects, virtual displacement mapping, light attenuation functions, precomputed shadow masks and directional light maps. UDK provides volumetric environmental
effects that integrate seamlessly into any environment. Camera, volume and opaque object
interactions are all handled per-pixel. Worlds created with UDK can easily feature multilayered, global fog height and fog volumes of multiple densities.
49