Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
Quarter Documentation

Quarter is a light-weight glue library that provides seamless integration between Systems in Motions's Coin high-level 3D visualization library and Trolltech's Qt 2D user interface library.

Qt and Coin is a perfect match since they are both open source, widely portable and easy to use. Quarter has evolved from Systems in Motion's own experiences using Coin and Qt together in our applications.

The functionality in Quarter revolves around QuarterWidget, a subclass of QGLWidget. This widget provides functionality for rendering of Coin scenegraphs and translation of QEvents into SoEvents. Using this widget is as easy as using any other QWidget.

Qt Designer Plugin

Quarter also comes with a plugin for Qt Designer, Trolltech's tool for designing and building GUIs. Once you install Quarter, the QuarterWidget becomes accessible in Qt Designer, and you can include it in the user interfaces you create. The plugin facility also provides you with the capability of dynamically loading ui files containing a QuarterWidget in your application.

By using Coin, Qt and Quarter to build your 3D graphics applications, you have the power to write software that is portable across the whole range of UNIX, Linux, Microsoft Windows and Mac OS X operating systems, from a 100% common codebase.

For a small, completely stand-alone usage example on how to initialize the library and set up a viewer instance window, see the following code:

#include <QtGui/QApplication>
#include <Inventor/nodes/SoBaseColor.h>
#include <Inventor/nodes/SoCone.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Quarter/Quarter.h>
#include <Quarter/QuarterWidget.h>
using namespace SIM::Coin3D::Quarter;
int
main(int argc, char ** argv)
{
QApplication app(argc, argv);
// Initializes Quarter library (and implicitly also the Coin and Qt
// libraries).
Quarter::init();
// Make a dead simple scene graph by using the Coin library, only
// containing a single yellow cone under the scenegraph root.
SoSeparator * root = new SoSeparator;
root->ref();
SoBaseColor * col = new SoBaseColor;
col->rgb = SbColor(1, 1, 0);
root->addChild(col);
root->addChild(new SoCone);
// Create a QuarterWidget for displaying a Coin scene graph
QuarterWidget * viewer = new QuarterWidget;
viewer->setSceneGraph(root);
// make the viewer react to input events similar to the good old
// ExaminerViewer
viewer->setNavigationModeFile(QUrl("coin:///scxml/navigation/examiner.xml"));
// Pop up the QuarterWidget
viewer->show();
// Loop until exit.
app.exec();
// Clean up resources.
root->unref();
delete viewer;
Quarter::clean();
return 0;
}

More Examples