The Urho3D engine compiles into one library. Conceptually it consists of several “sublibraries” that represent different subsystems or functionality.

    Urho3D引擎将编译成一个库的形式,从概念上讲它是由几个“库”组成,它们代表不同的子系统或功能。

    Each of these resides in a subdirectory under the Source/Urho3D directory:

    每个子系统或者库,分别放Source/Urho3D目录里面的一个子目录下:

    • Container. Provides STL replacement classes and shared pointers.
    • 容器: 提供替代类STL和智能指针。

    • Math. Provides vector, quaternion & matrix types and geometric shapes used in intersection tests.

    • Math: 向量(vector), 四元数(quaternion), 矩阵(matrix), 几何图形用于相交检测。

    • Core. Provides the execution Context, the base class Object for typed objects, object factories, event handling, threading and profiling.

    • 核心:提供Context, 基类Object用于获取对象的类型,对象工厂,事件句柄,线程和性能分析

    • IO. Provides file system access, stream input/output and logging.

    • IO: 提供文件访问,输入输出流,日志

    • Resource. Provides the ResourceCache and the base resource types, including XML documents.

    • 资源:提供资源缓存和基本的资源类型,保函xml文档

    • Scene. Provides Node and Component classes, from which Urho3D scenes are built.

    • 场景:提供结点和组件类,场景的构建将由这些组成。

    • Graphics. Provides application window handling and 3D rendering capabilities.

    • 图形:提供应用窗口句柄和3d渲染

    • Input. Provides input device access in both polled and event-based mode.

    • 输入:提供轮询和事件两种输入设备访问的模式

    • Network. Provides client-server networking functionality.

    • 网路:提供c/s网路功能

    • Audio. Provides the audio subsystem and playback of .wav & .ogg sounds in either 2D or 3D.

    • 音频:提供音频子系统和2d或3d的.wav和.ogg播放

    • UI. Provides graphical user interface elements.

    • UI:提供图形用户接口元素

    • Physics. Provides physics simulation.

    • 物理:提供物理模拟(bullet)

    • Navigation. Provides navigation mesh generation and pathfinding.

    • 导航:提供导航网格生成和寻路。

    • Urho2D. Provides 2D rendering components that integrate into the 3D scene.

    • Urho2D:提供2d渲染组件,整合到3d场景中

    • Script. Provides scripting support using the AngelScript language.

    • 脚本:提供AngelScript脚本语言的支持(另外还有lua)

    • Engine. Instantiates the subsystems from the modules above (except Script, which needs to be instantiated by the application) and manages the main loop iteration.

    • 引擎:实例化上面的模块(除了脚本,这个需要在应用中实例化)和管理主循环

    Execution context The heart of Urho3D is the Context object, which must always be created as the first in a Urho3D application, and deleted last.

    Context对象是执行上下(Execution context)的核心,在Urho3D应用中他必须首先创建,最后删除

    All “important” objects that derive from the Object base class, such as scene nodes, resources like textures and models, and the subsystems themselves require Context pointer in their constructor.

    所有“重要”的对象都是继承基类Object,比如场景的结点,资源的纹理和模型,和子系统在构建的时候需要Context对象的指针

    This avoids both the singleton pattern for subsystems, or having to pass around several objects into constructors.

    这既避免的子系统使用单利模式,又避免了在构造时候传递多个对象。

    The Context provides the following functionality (described in detail on their own pages):

    Context提供下面的功能(了解具体的细节请到相应的页面)

    Registering and accessing subsystems Creation and reflection facilities per object type: object factories and serializable attributes.

    注册和访问子系统的构建和反射每一个对象:对象工厂和序列化属性

    Sending events between objects Third-party libraries

    在第3方库之间传输事件

    The third-party libraries used by Urho3D and their purposes are:

    Urho3D使用第3方的目的是:

    • AngelScript: scripting language implementation
    • AngelScript: 脚本语言实现

    • Bullet: physics simulation implementation
    • Bullet:物理模拟实现

    • Civetweb: HTTP requests, use could be expanded to also provide an embedded web server
    • Civetweb: http请求,可以扩展成嵌入的web服务

    • FreeType: font rendering
    • FreeType:字体渲染

    • GLEW: OpenGL extensions handling
    • GLEW: OpenGL扩展句柄

    • kNet: UDP networking
    • kNet: UDP网路

    • libcpuid: CPU properties detection
    • libcpuid: CPU性能检测

    • Lua, LuaJIT, tolua+: Lua scripting implementation and bindings
    • Lua, LuaJIT, tolua+: Lua脚本执行和绑定

    • LZ4: data compression for package files
    • LZ4: 文件打包使用的压缩方式

    • MojoShader: HLSL shader reflection after compiling
    • MojoShader:编译后的HLSL着色器反射

    • Open Asset Import Library: reading various 3D file formats
    • Open Asset Import Library:读取各种3d文件格式

    • pugixml: parsing XML files
    • pugixml: xml文件解析

    • Recast/Detour: navigation mesh and pathfinding implementation
    • Recast/Detour: 导航网格,实现寻路

    • SDL: window and OpenGL context creation, input and sound output
    • SDL: 应用和OpenGL上下文的创建,输入和音频输出

    • StanHull: convex hull generation from triangle meshes, used for physics collision shapes
    • StanHull: 从三角形网格生成物理碰撞需要的凸包体

    • stb_image: image loading
    • stb_image:图片加载

    • stb_vorbis: Ogg Vorbis decoding
    • stb_vorbis Ogg Vorbis格式解码