Giter Club home page Giter Club logo

trackball's Introduction

Alt text

Overview

Trackball is a standalone C++ interactor for lightweight 3D programs.
A TrackBall (aka ArcBall) orbits about an arbitrary world coordinate, although this implementation also allows first-person pitch and yaw if desired. A right-hand ZYX system is used, but can be easily ported to a left-hand system.

Features

  • Intuitive "lookAt" camera model with focal center point, eye and up vectors.
  • Map three mouse buttons to either orbit, dolly (zoom), pan, first-person or roll.
  • Map scroll to dolly (zoom) or roll.
  • Adjust speed of all motions, such as with meta keys shift/ctrl/alt.
  • Depends only on the GLM library.
  • Cross-platform example with OpenGL and GLFW.

Example

Build

$ mkdir -p build &&                                                  \
  cd build &&                                                        \
  cmake -DGLFW_INCLUDE_DIR:PATH=/usr/local/glfw-3.1.2/include        \
        -DGLFW_LIBRARY:FILEPATH=/usr/local/glfw-3.1.2/lib/libglfw.so \
        -DGLM_INCLUDE_DIR:PATH=/usr/local/glm-0.9.7.4/include        \
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON                             \
        .. &&                                                        \
  make

Run

$ ./examples/glfw/example

References

License

trackball Copyright (C) 2016 Remik Ziemlinski

This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GPLv3 license.

trackball's People

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.