Overall structure

The Urho3D engine compiles into one library. Conceptually it consists of several "sublibraries" that represent different subsystems or functionality. Each of these resides in a subdirectory under the Source/Urho3D directory:

  • Container. Provides STL replacement classes and shared pointers.
  • Math. Provides vector, quaternion & matrix types and geometric shapes used in intersection tests.
  • Core. Provides the execution Context, the base class Object for typed objects, object factories, event handling, threading and profiling.
  • IO. Provides file system access, stream input/output and logging.
  • Resource. Provides the ResourceCache and the base resource types, including XML documents.
  • Scene. Provides Node and Component classes, from which Urho3D scenes are built.
  • Graphics. Provides application window handling and 3D rendering capabilities.
  • Input. Provides input device access in both polled and event-based mode.
  • Network. Provides client-server networking functionality.
  • Audio. Provides the audio subsystem and playback of .wav & .ogg sounds in either 2D or 3D.
  • UI. Provides graphical user interface elements.
  • Physics. Provides physics simulation.
  • Navigation. Provides navigation mesh generation and pathfinding.
  • Urho2D. Provides 2D rendering components that integrate into the 3D scene.
  • Script. Provides scripting support using the AngelScript language.
  • 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. 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. 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):

Third-party libraries

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

  • AngelScript: scripting language implementation
  • Bullet: physics simulation implementation
  • Civetweb: HTTP requests, use could be expanded to also provide an embedded web server
  • FreeType: font rendering
  • GLEW: OpenGL extensions handling
  • kNet: UDP networking
  • libcpuid: CPU properties detection
  • Lua, LuaJIT, tolua+: Lua scripting implementation and bindings
  • LZ4: data compression for package files
  • MojoShader: HLSL shader reflection after compiling
  • Open Asset Import Library: reading various 3D file formats
  • pugixml: parsing XML files
  • Recast/Detour: navigation mesh and pathfinding implementation
  • SDL: window and OpenGL context creation, input and sound output
  • StanHull: convex hull generation from triangle meshes, used for physics collision shapes
  • stb_image: image loading
  • stb_vorbis: Ogg Vorbis decoding