Library architecture can be separated into three main subsets — the core OpenSceneGraph library, osgViewer and a set of NodeKits.
Core The base of OpenSceneGraph library can be further divided into four main modules.
osg The core of OpenSceneGraph provides
classes and methods for construction and manipulation of the
scene graph. It contains classes representing various types of
nodes, scene geometry,
OpenGL state abstraction,
geometric transformations, as well as mathematical classes for 2D and 3D
vector and
matrix operations. Advanced
memory management is also included.
OpenThreads The OpenSceneGraph project contains a threading library,
OpenThreads, which is a lightweight cross-platform
thread model. It is intended to provide a minimal and complete Object-Oriented (OO) thread interface for
C++ programmers. It is loosely modeled on the
Java thread API, and the
POSIX Threads standards. The
architecture of OpenThreads is designed around "swappable" thread models which are defined at
compile-time in a
shared object library. It is of importance to note that while a
factory pattern design could have been used to achieve the goal of generic
interface, it would have required the programmer to allocate each of the 4 fundamental types (Thread, Mutex, Barrier, & Condition) on the
heap. Due to the cost associated with heap allocation of the underlying concrete implementations of these constructs on some platforms, such allocation was deemed unacceptable at the time this library was originally written, and thus the factory pattern was not used. Instead, a somewhat abstruse - but effective - technique was chosen to provide the necessary
data/implementation hiding. This technique uses private
void pointers to encapsulate object private data. The void pointers actually point at concrete data structures, but give a uniform interface to the dso. The design goal of OpenThreads is to construct optimized implementations using platform optimized multi-processing constructs such as the
sproc methods used on IRIX, and Windows threads.
osgUtil osgUtil contains
rendering backend functionality and utilities taking care of scene
graph traversal, rendering
optimisation and transforming the scene into a stream of
OpenGL API calls. It also provides means of basic interaction with scene, such as object picking.
osgDB This library is tasked with loading 3D model files. It supports many 2D/3D data
formats manipulators. More than 50 different formats are supported - most common are 3D data formats, such as
COLLADA (.dae),
LightWave (.lwo),
Wavefront (.obj),
OpenFlight (.flt),
3D Studio Max (.3ds),
DirectX (.x) and many others. OpenSceneGraph also provides its own native
ASCII .osg format. There are exporters into .osg format available for
Blender,
Maya and 3D Studio MAX. Supported picture formats include .rgb,
.gif,
.jpg,
.png,
.tiff, .pic,
.bmp,
.dds,
.tga and
quicktime. This module also provides I/O device abstraction. The other file-format loader plugins are registered with osgDB.
osgGA This is a GUI abstraction library required for different platforms.
osgViewer osgViewer Library provides a quick and easy way of
visualizing the graphics scene. It is also a platform-independent abstraction for various
window system interfaces.
osgProducer The OSG is also shipped with a
osgProducer which is just a platform-independent viewer supporting multiple graphic contexts and multi-threading.
NodeKits Project distribution also contains a variety of so-called
NodeKits. These are solutions of common problems and frequently used more advanced 3D application components and graphics algorithms. Among the most significant are • osgAnimation — Skeletal models usage, animating and morphing. • osgFX — Special effects and image postprocessing. • osgManipulator — Interactive 3D scene manipulation. • osgParticle — Advanced
particle system usage. • osgQt — Integration with
Qt toolkit and incorporation of QtGUI elements into OSG applications. • osgShadow — Framework for shadow rendering techniques. • osgTerrain — Extensive
terrain rendering. • osgText — Quality antialiased fonts, TrueType and FreeType font support. • osgVolume —
Volume rendering and volumetric data manipulation. • osgWidget — Simple
GUI creation. ==Reception and adoption==