Code Monkey home page Code Monkey logo

qtosg's Introduction

Build Status CII Best Practices

QtOSG: combining Qt and OSG in a thread-safe manner

This repository contains a widget based on QOpenGLWidget that is able to wrap a viewer from the OpenSceneGraph library. This makes it possible to combine both toolkits in a thread-safe manner.

Moreover, the widget demonstrates several interaction mechanisms:

  1. Rectangular selection processing
  2. Pick handling
  3. Node file writing (for debug purposes)

Requirements

  • Linux or MacOS X (see below for a brief discussion on supporting Microsoft Windows)
  • A recent C++ compiler with support for C++11
  • CMake (minimum version 2.8.11)
  • Qt5
  • OpenSceneGraph

What about Microsoft Windows

I am not familiar enough with graphics programming for Microsoft Windows to fully support this as a target platform. In issue 7, it was briefly discussed that some modifications are required for QtOSG to fully compile/work under Microsoft Windows. If you want to target this platform, I would be glad for the help!

Thanks to Martial Tola, support for compiling under Microsoft Windows has been added to the project and I am looking forward to any comments.

Building QtOSG

$ git clone https://github.com/Submanifold/QtOSG
$ cd QtOSG
$ mkdir build
$ cd build
$ cmake ../
$ make

Additional build options can be configured by issuing ccmake . in the build directory. In particular, you can toggle the following options:

  • WITH_PICK_HANDLER: toggle to compile with/without support for point picking
  • WITH_SELECTION_PROCESSING: toggle to compile with/without support for rectangular selections

Using QtOSG

The demo application merely demonstrates basic usage of the widget. Don't expect too much! Start the application by issuing ./qtosg in the build directory.

The following key bindings are active:

  • d: writes the current scene graph to /tmp/sceneGraph.osg
  • h: resets the view to home
  • s: toggles selection processing (if compiled); if active, hold left mouse button down to draw a selection rectangle; selected objects will be shown on the console

How to contribute

Please see the contribution guidelines for more information and a list of the contributors.

Licence

QtOSG uses the MIT licence. Pleas see the file LICENSE.md in the main directory of the repository for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.